diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2f9680..3e639ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: - name: Install Go uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 with: - go-version: 1.20.x + go-version: 1.21.x - name: Checkout code uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - name: Run linters @@ -27,7 +27,7 @@ jobs: if: success() uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 with: - go-version: 1.20.x + go-version: 1.21.x - name: Checkout code uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - name: Run tests @@ -64,7 +64,7 @@ jobs: if: success() uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 with: - go-version: 1.20.x + go-version: 1.21.x - name: Checkout code uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - name: Calc coverage diff --git a/Dockerfile b/Dockerfile index aebef49..f71d726 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.2-alpine3.17 +FROM golang:1.21.1-alpine3.17 # Add addtional packages needed for the race detector to work RUN apk add --update build-base make diff --git a/testrunner/testdata/expected/auto_assigned_task_ids.json b/testrunner/testdata/expected/auto_assigned_task_ids.json index bbb9d33..d1f7a9f 100644 --- a/testrunner/testdata/expected/auto_assigned_task_ids.json +++ b/testrunner/testdata/expected/auto_assigned_task_ids.json @@ -41,7 +41,7 @@ "name": "TestBlackjack/ blackjack with ten (ace first)", "status": "fail", "test_code": "func TestBlackjack(t *testing.T) {\n\tsomeAssignment := \"test\"\n\tfmt.Println(someAssignment)\n\n\ttype hand struct {\n\t\tcard1, card2 string\n\t}\n\ttt := struct {\n\t\tname string\n\t\thand hand\n\t\twant bool\n\t}{\n\t\tname: \"blackjack with ten (ace first)\",\n\t\thand: hand{card1: \"ace\", card2: \"ten\"},\n\t\twant: true,\n\t}\n\n\t_ = \"literally anything\"\n\n\tgot := IsBlackjack(tt.hand.card1, tt.hand.card2)\n\tif got != tt.want {\n\t\tt.Errorf(\"IsBlackjack(%s, %s) = %t, want %t\", tt.hand.card1, tt.hand.card2, got, tt.want)\n\t}\n\n\t// Additional statements should be included\n\tfmt.Println(\"the whole block\")\n\tfmt.Println(\"should be returned\")\n}", - "message": "\n=== RUN TestBlackjack/blackjack_with_ten_(ace_first)\n\n--- FAIL: TestBlackjack/blackjack_with_ten_(ace_first) \n\npanic: Please implement the IsBlackjack function [recovered]\n\n\tpanic: Please implement the IsBlackjack function\n\n\n\ngoroutine x [running]:\n\ntesting.tRunner.func1.2({, })\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ntesting.tRunner.func1()\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\npanic({, })\n\n\tPATH_PLACEHOLDER/src/runtime/panic.go \n\nconditionals.IsBlackjack(...)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/auto_assigned_task_ids/conditionals.go\n\nconditionals.TestBlackjack.func1?)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/auto_assigned_task_ids/conditionals_test.go \n\ntesting.tRunner, \n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ncreated by testing.(*T).Run\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n", + "message": "\n=== RUN TestBlackjack/blackjack_with_ten_(ace_first)\n\n--- FAIL: TestBlackjack/blackjack_with_ten_(ace_first) \n\npanic: Please implement the IsBlackjack function [recovered]\n\n\tpanic: Please implement the IsBlackjack function\n\n\n\ngoroutine x [running]:\n\ntesting.tRunner.func1.2({, })\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ntesting.tRunner.func1()\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\npanic({?, ?})\n\n\tPATH_PLACEHOLDER/src/runtime/panic.go \n\nconditionals.IsBlackjack(...)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/auto_assigned_task_ids/conditionals.go\n\nconditionals.TestBlackjack.func1?)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/auto_assigned_task_ids/conditionals_test.go \n\ntesting.tRunner, \n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ncreated by testing.(*T).Run in goroutine x\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n", "task_id": 4 } ] diff --git a/testrunner/testdata/expected/explicit_task_ids.json b/testrunner/testdata/expected/explicit_task_ids.json index 0fcb58e..580aad7 100644 --- a/testrunner/testdata/expected/explicit_task_ids.json +++ b/testrunner/testdata/expected/explicit_task_ids.json @@ -48,7 +48,7 @@ "name": "TestBlackjack/ blackjack with ten (ace first)", "status": "fail", "test_code": "// testRunnerTaskID=3\nfunc TestBlackjack(t *testing.T) {\n\tsomeAssignment := \"test\"\n\tfmt.Println(someAssignment)\n\n\ttype hand struct {\n\t\tcard1, card2 string\n\t}\n\ttt := struct {\n\t\tname string\n\t\thand hand\n\t\twant bool\n\t}{\n\t\tname: \"blackjack with ten (ace first)\",\n\t\thand: hand{card1: \"ace\", card2: \"ten\"},\n\t\twant: true,\n\t}\n\n\t_ = \"literally anything\"\n\n\tgot := IsBlackjack(tt.hand.card1, tt.hand.card2)\n\tif got != tt.want {\n\t\tt.Errorf(\"IsBlackjack(%s, %s) = %t, want %t\", tt.hand.card1, tt.hand.card2, got, tt.want)\n\t}\n\n\t// Additional statements should be included\n\tfmt.Println(\"the whole block\")\n\tfmt.Println(\"should be returned\")\n}", - "message": "\n=== RUN TestBlackjack/blackjack_with_ten_(ace_first)\n\n--- FAIL: TestBlackjack/blackjack_with_ten_(ace_first) \n\npanic: Please implement the IsBlackjack function [recovered]\n\n\tpanic: Please implement the IsBlackjack function\n\n\n\ngoroutine x [running]:\n\ntesting.tRunner.func1.2({, })\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ntesting.tRunner.func1()\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\npanic({, })\n\n\tPATH_PLACEHOLDER/src/runtime/panic.go \n\nconditionals.IsBlackjack(...)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/explicit_task_ids/conditionals.go\n\nconditionals.TestBlackjack.func1?)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/explicit_task_ids/conditionals_test.go \n\ntesting.tRunner, \n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ncreated by testing.(*T).Run\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n", + "message": "\n=== RUN TestBlackjack/blackjack_with_ten_(ace_first)\n\n--- FAIL: TestBlackjack/blackjack_with_ten_(ace_first) \n\npanic: Please implement the IsBlackjack function [recovered]\n\n\tpanic: Please implement the IsBlackjack function\n\n\n\ngoroutine x [running]:\n\ntesting.tRunner.func1.2({, })\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ntesting.tRunner.func1()\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\npanic({?, ?})\n\n\tPATH_PLACEHOLDER/src/runtime/panic.go \n\nconditionals.IsBlackjack(...)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/explicit_task_ids/conditionals.go\n\nconditionals.TestBlackjack.func1?)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/explicit_task_ids/conditionals_test.go \n\ntesting.tRunner, \n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ncreated by testing.(*T).Run in goroutine x\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n", "task_id": 3 } ] diff --git a/testrunner/testdata/expected/non_executed_tests.json b/testrunner/testdata/expected/non_executed_tests.json index afddb29..aaac4e2 100644 --- a/testrunner/testdata/expected/non_executed_tests.json +++ b/testrunner/testdata/expected/non_executed_tests.json @@ -27,7 +27,7 @@ "name": "TestQuantities/ few layers", "status": "fail", "test_code": "func TestQuantities(t *testing.T) {\n\ttt := quantitiesTest{\n\t\tname: \"few layers\",\n\t\tlayers: []string{\"noodles\", \"sauce\", \"noodles\"},\n\t\texpNoodles: 100,\n\t\texpSauce: 0.2,\n\t}\n\n\tgotNoodles, gotSauce := Quantities(tt.layers)\n\tif gotNoodles != tt.expNoodles {\n\t\tt.Errorf(\"quantities(%v) = %d noodles; want %d\", tt.layers, gotNoodles, tt.expNoodles)\n\t}\n\tif gotSauce != tt.expSauce {\n\t\tt.Errorf(\"quantities(%v) = %f sauce; want %f\", tt.layers, gotSauce, tt.expSauce)\n\t}\n\n}", - "message": "\n=== RUN TestQuantities/few_layers\n\n--- FAIL: TestQuantities/few_layers \n\npanic: Please implement [recovered]\n\n\tpanic: Please implement\n\n\n\ngoroutine x [running]:\n\ntesting.tRunner.func1.2({, })\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ntesting.tRunner.func1()\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\npanic({, })\n\n\tPATH_PLACEHOLDER/src/runtime/panic.go \n\nlasagna.Quantities(...)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/non_executed_tests/lasagna_master.go\n\nlasagna.TestQuantities.func1?)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/non_executed_tests/lasagna_master_test.go \n\ntesting.tRunner, \n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ncreated by testing.(*T).Run\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n", + "message": "\n=== RUN TestQuantities/few_layers\n\n--- FAIL: TestQuantities/few_layers \n\npanic: Please implement [recovered]\n\n\tpanic: Please implement\n\n\n\ngoroutine x [running]:\n\ntesting.tRunner.func1.2({, })\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ntesting.tRunner.func1()\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\npanic({?, ?})\n\n\tPATH_PLACEHOLDER/src/runtime/panic.go \n\nlasagna.Quantities(...)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/non_executed_tests/lasagna_master.go\n\nlasagna.TestQuantities.func1?)\n\n\tPATH_PLACEHOLDER/testrunner/testdata/concept/non_executed_tests/lasagna_master_test.go \n\ntesting.tRunner, \n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n\ncreated by testing.(*T).Run in goroutine x\n\n\tPATH_PLACEHOLDER/src/testing/testing.go \n", "task_id": 2 }, {