Implement linting issues and merge request comments

This commit is contained in:
Maximilian Paß
2021-06-07 16:53:10 +02:00
committed by Maximilian Pass
parent 4b5f0a3eb6
commit 32fe47d669
23 changed files with 363 additions and 328 deletions

View File

@@ -18,7 +18,7 @@ const (
)
func TestCreateOrUpdateEnvironment(t *testing.T) {
path := helpers.BuildURL(api.BasePath, api.EnvironmentsPath, tests.AnotherEnvironmentIdAsString)
path := helpers.BuildURL(api.BasePath, api.EnvironmentsPath, tests.AnotherEnvironmentIDAsString)
t.Run("returns bad request with empty body", func(t *testing.T) {
resp, err := helpers.HttpPut(path, strings.NewReader(""))
@@ -68,7 +68,7 @@ func TestCreateOrUpdateEnvironment(t *testing.T) {
})
_, _, err := nomadClient.Jobs().DeregisterOpts(
tests.AnotherEnvironmentIdAsString, &nomadApi.DeregisterOptions{Purge: true}, nil)
tests.AnotherEnvironmentIDAsString, &nomadApi.DeregisterOptions{Purge: true}, nil)
if err != nil {
t.Fatalf("Error when removing test job %v", err)
}
@@ -87,7 +87,7 @@ func assertPutReturnsStatusAndZeroContent(t *testing.T, path string,
func validateJob(t *testing.T, expected dto.ExecutionEnvironmentRequest) {
t.Helper()
job := findNomadJob(t, tests.AnotherEnvironmentIdAsString)
job := findNomadJob(t, tests.AnotherEnvironmentIDAsString)
assertEqualValueStringPointer(t, nomadNamespace, job.Namespace)
assertEqualValueStringPointer(t, "batch", job.Type)

View File

@@ -66,7 +66,7 @@ func (s *E2ETestSuite) TestDeleteRunnerRoute() {
})
s.Run("Deleting non-existing runner returns NotFound", func() {
resp, err := helpers.HttpDelete(helpers.BuildURL(api.BasePath, api.RunnersPath, tests.NonExistingId), nil)
resp, err := helpers.HttpDelete(helpers.BuildURL(api.BasePath, api.RunnersPath, tests.NonExistingID), nil)
s.NoError(err)
s.Equal(http.StatusNotFound, resp.StatusCode)
})
@@ -178,7 +178,7 @@ func (s *E2ETestSuite) TestCopyFilesRoute() {
})
s.Run("Copying to non-existing runner returns NotFound", func() {
resp, err := helpers.HttpPatch(helpers.BuildURL(api.BasePath, api.RunnersPath, tests.NonExistingId, api.UpdateFileSystemPath), "application/json", bytes.NewReader(copyFilesRequestByteString))
resp, err := helpers.HttpPatch(helpers.BuildURL(api.BasePath, api.RunnersPath, tests.NonExistingID, api.UpdateFileSystemPath), "application/json", bytes.NewReader(copyFilesRequestByteString))
s.NoError(err)
s.Equal(http.StatusNotFound, resp.StatusCode)
})