-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fixes #23830: Migrate users and supervised target APIs in change-validation to zio-json #614
Conversation
Commit modified |
84730d8
to
df34155
Compare
PR updated with a new commit |
|
||
@RunWith(classOf[JUnitRunner]) | ||
class MigrateSupervisedGroupsTests extends Specification with JsonSpecMatcher with AfterAll { | ||
isolated |
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.
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.
(previously I got a "directory already exist", which was more explicit)
|
||
"do nothing if the directory is not writable" in { | ||
val unsupervisedRepo = new UnsupervisedTargetsRepository(tmpDirPath, "unsupervised-targets.json") | ||
tmpDir.setPermissions(PosixFilePermissions.fromString("r--r--r--").asScala.toSet) |
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 need to be at least rw-r--r--
else the test modifying it fails. (SupervisedTargetsApiTest
, the POST
)
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.
That's right the tests were not passing ! The change was there :
Line 28 in 31df6b8
.setPermissions(PosixFilePermissions.fromString("rw-r--r--").asScala.toSet) |
rw
😄)
50c26a1
to
31df6b8
Compare
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
(more tests will be needed once rudder header are fully restored)
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
31df6b8
to
eb13a14
Compare
https://issues.rudder.io/issues/23830
This is the migration of 2 APIs in the change-validation plugin to use zio-json to replace lift-json (there is one bigger REST API to migrate still, and in consequence lots of refactoring from the lift
Box
type to the zioIOResult
type in the interfaces, but this will be made in another PR).I kept the same behavior everywhere as I could, so there may be 'weird' (rather uncommon) things such as logging a decoding error...
I also added tests to the APIs using the yaml format, and to the repositories, which had some saving 'workflow' to test...