Skip to content

Commit 194b04a

Browse files
authored
Revert MQSC error check (#283)
* Revert MQSC error check
1 parent 0d3e177 commit 194b04a

File tree

3 files changed

+34
-35
lines changed

3 files changed

+34
-35
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## vNext
44

55
* Now runs using the "mqm" user instead of root. See new [security doc](https://github.com/ibm-messaging/mq-container/blob/master/docs/security.md)
6-
* [New IGNSTATE parameter for runmqsc START and STOP commands](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.pro.doc/q132310_.htm#q132310___ignstateparm) - From MQ version 9.1.1.0, any MQSC scripts included in the image should make use of the `IGNSTATE(YES)` parameter on any `START` and `STOP` commands. This allows for consistency when executing scripts multiple times (e.g. when a container is restarted)
6+
* New [IGNSTATE](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.pro.doc/q132310_.htm#q132310___ignstateparm) parameter used in default developer config
77
* Termination log moved from `/dev/termination-log` to `/run/termination-log`, to make permissions easier to handle
88
* Fixes for the following issues:
99
* Brackets no longer appear in termination log

cmd/runmqserver/qmgr.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ func configureQueueManager() error {
120120
out, err := cmd.CombinedOutput()
121121
if err != nil {
122122
log.Errorf("Error running MQSC file %v (%v):\n\t%v", file.Name(), err, strings.Replace(string(out), "\n", "\n\t", -1))
123-
return err
124123
}
125124
// Print the runmqsc output, adding tab characters to make it more readable as part of the log
126125
log.Printf("Output for \"runmqsc\" with %v:\n\t%v", abs, strings.Replace(string(out), "\n", "\n\t", -1))

test/docker/docker_api_test.go

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -536,39 +536,39 @@ func TestMQSC(t *testing.T) {
536536

537537
// TestInvalidMQSC creates a new image with an MQSC file containing invalid MQSC,
538538
// tries to start a container based on that image, and checks that container terminates
539-
func TestInvalidMQSC(t *testing.T) {
540-
t.Parallel()
541-
cli, err := client.NewEnvClient()
542-
if err != nil {
543-
t.Fatal(err)
544-
}
545-
var files = []struct {
546-
Name, Body string
547-
}{
548-
{"Dockerfile", fmt.Sprintf(`
549-
FROM %v
550-
USER root
551-
RUN rm -f /etc/mqm/*.mqsc
552-
ADD mqscTest.mqsc /etc/mqm/
553-
RUN chmod 0660 /etc/mqm/mqscTest.mqsc
554-
USER mqm`, imageName())},
555-
{"mqscTest.mqsc", "DEFINE INVALIDLISTENER('TEST.LISTENER.TCP') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) REPLACE"},
556-
}
557-
tag := createImage(t, cli, files)
558-
defer deleteImage(t, cli, tag)
559-
560-
containerConfig := container.Config{
561-
Env: []string{"LICENSE=accept", "MQ_QMGR_NAME=qm1"},
562-
Image: tag,
563-
}
564-
id := runContainer(t, cli, &containerConfig)
565-
defer cleanContainer(t, cli, id)
566-
rc := waitForContainer(t, cli, id, 60*time.Second)
567-
if rc != 1 {
568-
t.Errorf("Expected rc=1, got rc=%v", rc)
569-
}
570-
expectTerminationMessage(t, cli, id)
571-
}
539+
// func TestInvalidMQSC(t *testing.T) {
540+
// t.Parallel()
541+
// cli, err := client.NewEnvClient()
542+
// if err != nil {
543+
// t.Fatal(err)
544+
// }
545+
// var files = []struct {
546+
// Name, Body string
547+
// }{
548+
// {"Dockerfile", fmt.Sprintf(`
549+
// FROM %v
550+
// USER root
551+
// RUN rm -f /etc/mqm/*.mqsc
552+
// ADD mqscTest.mqsc /etc/mqm/
553+
// RUN chmod 0660 /etc/mqm/mqscTest.mqsc
554+
// USER mqm`, imageName())},
555+
// {"mqscTest.mqsc", "DEFINE INVALIDLISTENER('TEST.LISTENER.TCP') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR) REPLACE"},
556+
// }
557+
// tag := createImage(t, cli, files)
558+
// defer deleteImage(t, cli, tag)
559+
560+
// containerConfig := container.Config{
561+
// Env: []string{"LICENSE=accept", "MQ_QMGR_NAME=qm1"},
562+
// Image: tag,
563+
// }
564+
// id := runContainer(t, cli, &containerConfig)
565+
// defer cleanContainer(t, cli, id)
566+
// rc := waitForContainer(t, cli, id, 60*time.Second)
567+
// if rc != 1 {
568+
// t.Errorf("Expected rc=1, got rc=%v", rc)
569+
// }
570+
// expectTerminationMessage(t, cli, id)
571+
// }
572572

573573
// TestReadiness creates a new image with large amounts of MQSC in, to
574574
// ensure that the readiness check doesn't pass until configuration has finished.

0 commit comments

Comments
 (0)