Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix various issues to setup a working CI #5

Merged
merged 6 commits into from
Jan 6, 2022

Conversation

EtienneM
Copy link
Member

@EtienneM EtienneM commented Jan 4, 2022

The CI had been configured but wasn't working due to the specificity of this repository. This repo is a fork, hence it does not work as the other projects.

Verified

This commit was signed with the committer’s verified signature.
EtienneM Étienne M.

Verified

This commit was signed with the committer’s verified signature.
EtienneM Étienne M.

Verified

This commit was signed with the committer’s verified signature.
EtienneM Étienne M.
@EtienneM EtienneM self-assigned this Jan 4, 2022

Verified

This commit was signed with the committer’s verified signature.
EtienneM Étienne M.

Verified

This commit was signed with the committer’s verified signature.
EtienneM Étienne M.

Verified

This commit was signed with the committer’s verified signature.
EtienneM Étienne M.
@EtienneM EtienneM marked this pull request as ready for review January 5, 2022 09:43
@@ -1,9 +1,9 @@
.PHONY: all test test-local install-deps lint fmt vet

REPO_NAME = go-plugins-helpers
REPO_OWNER = docker
REPO_OWNER = Scalingo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is mandatory for the tests to be executable lcoally with the Makefile. But the Makefile uses Docker which is not usable in CodeShip.

Comment on lines +42 to +46
myPluginSpecDir := os.Getenv("PLUGIN_SPEC_DIR")
if myPluginSpecDir == "" {
myPluginSpecDir = "/etc/docker"
}
pluginSpecDir := PluginSpecDir(myPluginSpecDir)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to make this change to configure the tests on CodeShip.

t.Fatalf("Expected %s, got %s\n", "{\"Err\":\"I CAN HAZ ERRORZ\"}\n", string(body))

expectedBody := "{\"Err\":\"I CAN HAZ ERRORZ\"}\n"
if string(body) != expectedBody {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test actually failed due to what has been fixed in Scalingo/go-handlers#37

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I'm not sure to understand the reason of the failure. Would you like to explain a bit please ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The body returned by the call to the endpoint contained {\"Err\":\"I CAN HAZ ERRORZ\"}\nI CAN HAZ ERRORZ. Because go-handlers detected the type as non-JSON, and go-handlers didn't took into account that the body was already written.

Copy link
Member

@curzolapierre curzolapierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

t.Fatalf("Expected %s, got %s\n", "{\"Err\":\"I CAN HAZ ERRORZ\"}\n", string(body))

expectedBody := "{\"Err\":\"I CAN HAZ ERRORZ\"}\n"
if string(body) != expectedBody {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I'm not sure to understand the reason of the failure. Would you like to explain a bit please ?

@EtienneM EtienneM merged commit dea56b4 into master Jan 6, 2022
@EtienneM EtienneM deleted the fix/sync_upstream branch January 6, 2022 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants