add e2e for user flag (#692)

This commit is contained in:
Murugappan Chetty 2020-02-29 09:22:52 -08:00 committed by GitHub
parent b14dc2dc7f
commit b95f40e2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,12 @@ func TestServiceOptions(t *testing.T) {
test.validateContainerField(t, r, "svc5", "args", "[myArg1 --myArg2]")
test.serviceUpdate(t, r, "svc5", "--arg", "myArg1")
test.validateContainerField(t, r, "svc5", "args", "[myArg1]")
t.Log("create, update and validate service with user defined")
test.serviceCreateWithOptions(t, r, "svc6", "--user", "1001")
test.validateContainerField(t, r, "svc6", "securityContext.runAsUser", "1001")
test.serviceUpdate(t, r, "svc6", "--user", "1002")
test.validateContainerField(t, r, "svc6", "securityContext.runAsUser", "1002")
}
func (test *e2eTest) serviceCreateWithOptions(t *testing.T, r *KnRunResultCollector, serviceName string, options ...string) {