Unverified Commit d1095ca7 authored by Mahmood Ali's avatar Mahmood Ali Committed by GitHub
Browse files

Merge pull request #9903 from hashicorp/b-e2e-tweaks-20210126_2

e2e: Disable node drain deadline tests
parents 491bb3bd 38a7e73c
Showing with 9 additions and 3 deletions
+9 -3
......@@ -176,7 +176,7 @@ func (tc *ConsulE2ETest) TestCanaryInplaceUpgrades(f *framework.F) {
return true, nil
}, func(err error) {
require.NoError(t, err, "error while waiting for deploys")
f.NoError(err, "error while waiting for deploys")
})
allocID := activeDeploy.TaskGroups["consul_canary_test"].PlacedCanaries[0]
......@@ -196,7 +196,7 @@ func (tc *ConsulE2ETest) TestCanaryInplaceUpgrades(f *framework.F) {
return *alloc.DeploymentStatus.Healthy, fmt.Errorf("expected healthy canary but found: %#v",
alloc.DeploymentStatus)
}, func(err error) {
require.NoError(t, err, "error waiting for canary to be healthy")
f.NoError(err, "error waiting for canary to be healthy")
})
// Check Consul for canary tags
......@@ -212,7 +212,7 @@ func (tc *ConsulE2ETest) TestCanaryInplaceUpgrades(f *framework.F) {
}
return false, fmt.Errorf(`could not find service tags {"canary", "foo"}: %#v`, consulServices)
}, func(err error) {
require.NoError(t, err, "error waiting for canary tags")
f.NoError(err, "error waiting for canary tags")
})
// Promote canary
......
......@@ -245,6 +245,7 @@ func (tc *NodeDrainE2ETest) TestNodeDrainIgnoreSystem(f *framework.F) {
// TestNodeDrainDeadline tests the enforcement of the node drain deadline so
// that allocations are terminated even if they haven't gracefully exited.
func (tc *NodeDrainE2ETest) TestNodeDrainDeadline(f *framework.F) {
f.T().Skip("The behavior is unclear and test assertions don't capture intent. Issue 9902")
jobID := "test-node-drain-" + uuid.Generate()[0:8]
f.NoError(e2e.Register(jobID, "nodedrain/input/drain_deadline.nomad"))
......@@ -272,6 +273,8 @@ func (tc *NodeDrainE2ETest) TestNodeDrainDeadline(f *framework.F) {
// deadline here needs to account for scheduling and propagation delays.
f.NoError(waitForNodeDrain(nodeID,
func(got []map[string]string) bool {
// FIXME: check the drain job alloc specifically. test
// may pass if client had another completed alloc
for _, alloc := range got {
if alloc["Status"] == "complete" {
return true
......@@ -285,6 +288,7 @@ func (tc *NodeDrainE2ETest) TestNodeDrainDeadline(f *framework.F) {
// TestNodeDrainDeadline tests the enforcement of the node drain -force flag
// so that allocations are terminated immediately.
func (tc *NodeDrainE2ETest) TestNodeDrainForce(f *framework.F) {
f.T().Skip("The behavior is unclear and test assertions don't capture intent. Issue 9902")
jobID := "test-node-drain-" + uuid.Generate()[0:8]
f.NoError(e2e.Register(jobID, "nodedrain/input/drain_deadline.nomad"))
......@@ -310,6 +314,8 @@ func (tc *NodeDrainE2ETest) TestNodeDrainForce(f *framework.F) {
// the job
f.NoError(waitForNodeDrain(nodeID,
func(got []map[string]string) bool {
// FIXME: check the drain job alloc specifically. test
// may pass if client had another completed alloc
for _, alloc := range got {
if alloc["Status"] == "complete" {
return true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment