@@ -52,6 +52,8 @@ func TestLicenseNotSet(t *testing.T) {
5252 expectTerminationMessage (t , cli , id )
5353}
5454
55+ //Start container with LICENSE environment variable set to view.
56+ //Check that container starts and display license text
5557func TestLicenseView (t * testing.T ) {
5658 t .Parallel ()
5759
@@ -132,42 +134,6 @@ func goldenPath(t *testing.T, metric bool) {
132134 stopContainer (t , cli , id )
133135}
134136
135- // TestSecurityVulnerabilities checks for any vulnerabilities in the image, as reported
136- // by Red Hat
137- func TestSecurityVulnerabilities (t * testing.T ) {
138- t .Parallel ()
139-
140- cli , err := client .NewClientWithOpts (client .FromEnv )
141- if err != nil {
142- t .Fatal (err )
143- }
144- rc , _ := runContainerOneShot (t , cli , "bash" , "-c" , "command -v microdnf && test -e /etc/yum.repos.d/ubi.repo" )
145- if rc != 0 {
146- t .Skip ("Skipping test because container is based on ubi-minimal, which doesn't include yum" )
147- }
148- // id, _, err := command.Run("sudo", "buildah", "from", imageName())
149- // if err != nil {
150- // t.Log(id)
151- // t.Fatal(err)
152- // }
153- // id = strings.TrimSpace(id)
154- // defer command.Run("buildah", "rm", id)
155- // mnt, _, err := command.Run("sudo", "buildah", "mount", id)
156- // if err != nil {
157- // t.Log(mnt)
158- // t.Fatal(err)
159- // }
160- // mnt = strings.TrimSpace(mnt)
161- // out, _, err := command.Run("bash", "-c", "sudo cp /etc/yum.repos.d/* "+filepath.Join(mnt, "/etc/yum.repos.d/"))
162- // if err != nil {
163- // t.Log(out)
164- // t.Fatal(err)
165- // }
166- // out, ret, _ := command.Run("bash", "-c", "yum --installroot="+mnt+" updateinfo list sec | grep /Sec")
167- // if ret != 1 {
168- // t.Errorf("Expected no vulnerabilities, found the following:\n%v", out)
169- // }
170- }
171137
172138func utilTestNoQueueManagerName (t * testing.T , hostName string , expectedName string ) {
173139 search := "QMNAME(" + expectedName + ")"
@@ -187,6 +153,7 @@ func utilTestNoQueueManagerName(t *testing.T, hostName string, expectedName stri
187153 t .Errorf ("Expected result of running dspmq to contain name=%v, got name=%v" , search , out )
188154 }
189155}
156+
190157func TestNoQueueManagerName (t * testing.T ) {
191158 t .Parallel ()
192159
0 commit comments