forked from toolshed/abra
		
	chore: change test context names
This commit is contained in:
		| @ -31,29 +31,30 @@ func dockerContext(host, key string) TestContext { | ||||
| } | ||||
|  | ||||
| func TestCreateContext(t *testing.T) { | ||||
| 	err := client.CreateContext("testCreate", "wronguser", "wrongport") | ||||
| 	err := client.CreateContext("testContext0", "wronguser", "wrongport") | ||||
| 	if err == nil { | ||||
| 		t.Error("client.CreateContext(\"testCreate\", \"wronguser\", \"wrongport\") should have failed but didn't return an error") | ||||
| 		t.Error("client.CreateContext(\"testContextCreate\", \"wronguser\", \"wrongport\") should have failed but didn't return an error") | ||||
| 	} | ||||
| 	err = client.CreateContext("testCreate", "", "") | ||||
| 	err = client.CreateContext("testContext0", "", "") | ||||
| 	if err != nil { | ||||
| 		t.Errorf("Couldn't create context: %s", err) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func TestDeleteContext(t *testing.T) { | ||||
| 	ensureTestState(1, 1) | ||||
| 	err := client.DeleteContext("default") | ||||
| 	if err == nil { | ||||
| 		t.Errorf("client.DeleteContext(\"default\") should have failed but didn't return an error") | ||||
| 	} | ||||
|  | ||||
| 	err = client.DeleteContext("testCreate") | ||||
| 	err = client.DeleteContext("testContext0") | ||||
| 	if err != nil { | ||||
| 		t.Errorf("client.DeleteContext(\"testCreate\") failed: %s", err) | ||||
| 		t.Errorf("client.DeleteContext(\"testContext0\") failed: %s", err) | ||||
| 	} | ||||
| 	err = client.DeleteContext("testCreate") | ||||
| 	err = client.DeleteContext("testContextFail0") | ||||
| 	if err == nil { | ||||
| 		t.Errorf("client.DeleteContext(\"testCreate\") should have failed this time (attempt to delete non-existent context) but didn't return an error") | ||||
| 		t.Errorf("client.DeleteContext(\"testContextFail0\") should have failed (attempt to delete non-existent context) but didn't return an error") | ||||
| 	} | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user