Closed byteflood closed 1 year ago
I have a question about the following two lines of code.
Why do they differ in syntax: =>
vs :
? Are they supposed to be semantically the same?
I'm unfamiliar with Ruby, but from looking through the code, my guess is that :
is used to bind optional parameters.
And my guess is that =>
binds keys to values in objects.
It looks to me the first one is correct (register_spec.ruby), except that for this pull request perhaps the argument should be enclosed in {}
, so that we can add a 3rd parameter to the function.
So that we get:
allow(PuppetX::Gitlab::Runner).to receive(:register).with(url, { 'token' => regtoken }, ca_file: nil).and_return(return_hash)
However, that leaves me in a situation where I believe that the token is not correctly passed and interpreted by the gitlab instance for bolt tasks, so I must be doing something wrong.
Note that in my local instance, the puppet register code using ca_file actually works (although I'm unsure about unregister).
I assume we can close this issue. Fix was merged with #135
Dear @byteflood, thanks for the PR!
This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?
You can find my sourcecode at voxpupuli/vox-pupuli-tasks
I think this is obsolete now. Please reopen it if you think it's still required.
Pull Request (PR) description
Added an optional parameter
ca_file
toAPIClient
that can specify a certificate authority file. Added an optional parameterca_file
togitlab_ci_runner
andgitlab_ci_runner::runner
This Pull Request (PR) fixes the following issues
Fixes #124