Closed andrerfcsantos closed 1 year ago
It seems the tests are now failing for 2 main reasons:
TestRunTests_broken
, which tests testrunner/testdata/practice/broken/
seems to fail with an error of returned exit code 1: exit status 1
, but the tests expect returned exit code 2: exit status 2
.TestRunTests_passing
the field message
in the json is slightly off. For the subtests, in the message
field, the command is returning [...]\n\n--- PASS: TestTrivialPass1/subtest_1.1[...]
, but the tests expect [...]\n\n --- PASS: TestTrivialPass1/subtest_1.1[...]
, i.e, the spaces before --- PASS
are not present in the result of the command.@junedev Do you know if this is due to the new format of go test -json
and we can safely change what the tests expect or is it a problem in the code that we must address? Can't find any details on the go test -json
change other than the release notes which doesn't explain in detail what changed.
@andrerfcsantos I updated the expected json files to what I think they should be. Currently, some tests fail though because e.g. the text that is returned as result of a panic is not included anymore. We will need to fix the actual code for this. (Potentially something related to stdout vs stderr.)
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
testrunner/execute.go | 5 | 11 | 45.45% | ||
<!-- | Total: | 11 | 17 | 64.71% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
testrunner/execute.go | 1 | 52.35% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 4286880947: | 0.2% |
Covered Lines: | 362 |
Relevant Lines: | 573 |
@andrerfcsantos I undrafted this so Erik can have a look. The main repo can be updated whenever we want after this is merged, they are not on the same Go version anyway since we use "latest" here and an older version for the exercises.
The representer and analayzer are not live so also no dependency regarding the update there.
Would be good if you can double check the changes to the expected outputs look ok to you.
@junedev This is great, thanks!
The main repo can be updated whenever we want after this is merged, they are not on the same Go version anyway since we use "latest" here and an older version for the exercises. The representer and analayzer are not live so also no dependency regarding the update there.
Changed the descriptions accordingly.
Would be good if you can double check the changes to the expected outputs look ok to you.
It does. As far as I understand, after the changes you made it's just a couple of spaces removed before the ---
, which I think is better.
Description
This is part of the upgrade of the track to Go 1.20:
go.mod
fileioutil
being deprecated.0.7.0
to address GO-2022-1059go.sum
for external dependencies using ago.mod
set to 1.18Related
PR that also should be merged for the track to be considered "upgraded":
The following PRs should be merged eventually, but there's no rush since Go currently doesn't have the representer or the analyzer enabled: