-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
c60a330
to
86dd535
Compare
@@ -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 |
There was a problem hiding this comment.
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.
myPluginSpecDir := os.Getenv("PLUGIN_SPEC_DIR") | ||
if myPluginSpecDir == "" { | ||
myPluginSpecDir = "/etc/docker" | ||
} | ||
pluginSpecDir := PluginSpecDir(myPluginSpecDir) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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 ?
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.