-
Notifications
You must be signed in to change notification settings - Fork 102
Conversation
Signed-off-by: Kadu Artur Prussek <[email protected]>
* Move rcontext to env Signed-off-by: Kadu Artur Prussek <[email protected]> * Fix test Signed-off-by: Kadu Artur Prussek <[email protected]> * Fix lint Signed-off-by: Kadu Artur Prussek <[email protected]>
Signed-off-by: Kadu Artur Prussek <[email protected]>
* Create new command rit set env Signed-off-by: Kadu Artur Prussek <[email protected]> * Remove the redundant Env variable names Signed-off-by: Kadu Artur Prussek <[email protected]>
Signed-off-by: Kadu Artur Prussek <[email protected]>
* Create new command rit show env Signed-off-by: Kadu Artur Prussek <[email protected]> * Create new command rit delete env Signed-off-by: Kadu Artur Prussek <[email protected]> * Fix functional tests Signed-off-by: Kadu Artur Prussek <[email protected]> * Fix functional tests Signed-off-by: Kadu Artur Prussek <[email protected]>
* Convert contexts to envs by postinst.sh Signed-off-by: Kadu Artur Prussek <[email protected]> * Remove Mac script Signed-off-by: Kadu Artur Prussek <[email protected]> * Add install.sh Signed-off-by: Kadu Artur Prussek <[email protected]> * Update install.sh Signed-off-by: Kadu Artur Prussek <[email protected]> * Create convert contexts file to envs file Signed-off-by: Kadu Artur Prussek <[email protected]> * Remove compatibility script Signed-off-by: Kadu Artur Prussek <[email protected]>
Signed-off-by: Kadu Artur Prussek <[email protected]>
Signed-off-by: Kadu Artur Prussek <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #706 +/- ##
==========================================
+ Coverage 81.46% 82.04% +0.57%
==========================================
Files 110 110
Lines 3669 3726 +57
==========================================
+ Hits 2989 3057 +68
+ Misses 495 484 -11
Partials 185 185
Continue to review full report at Codecov.
|
Signed-off-by: Kadu Artur Prussek <[email protected]>
Signed-off-by: Kadu Artur Prussek <[email protected]>
* Rename all methods and variables named context Signed-off-by: Kadu Artur Prussek <[email protected]> * Fix Signed-off-by: Kadu Artur Prussek <[email protected]>
credentialResolver := NewResolver(tt.in.credFinder, tt.in.credSetter, tt.in.pass) | ||
got, err := credentialResolver.Resolve(tt.in.credentialField) | ||
|
||
if tt.out.err != nil && tt.out.err.Error() != err.Error() { | ||
t.Errorf("Resolve(%s) got %v, want %v", tt.name, err, tt.out.err) | ||
} | ||
if got != tt.out.want { | ||
t.Errorf("Resolve(%s) got %v, want %v", tt.name, got, tt.out.want) | ||
} |
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.
can we use testify assertions?
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.
makes sense, but I think we can do it in another task :)
type passwordMock struct { | ||
value string | ||
err error | ||
} | ||
|
||
func (pass passwordMock) Password(string, ...string) (string, error) { | ||
return pass.value, pass.err | ||
} | ||
|
||
type setCredMock struct { | ||
err error | ||
} | ||
|
||
func (s setCredMock) Set(d Detail) error { | ||
return s.err | ||
} |
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.
can we use testify mocks? From the mock package prefereably
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.
You can ignore my test comments, it might not be the scope of this pr
/merge qa |
👌 Merged branch feature/switch_context_to_env into qa |
Signed-off-by: Kadu Artur Prussek <[email protected]>
/merge qa |
👌 Merged branch feature/switch_context_to_env into qa |
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.
🚀
Description
All context commands have been deprecated and new envs created:
rit set context
➡️rit set env
rit show context
➡️rit show env
rit delete context
➡️rit delete env
How to verify it
All new commands must behave as the old commands worked, only with the difference that now instead of context we have environments.
Changelog
Switch context to env command