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

[Workspace]Fix dynamicConfigServiceMock import path in workspace routes UT #7954

Merged

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Sep 2, 2024

Description

The dynamicConfigServiceMock has been changed in this PR. Current PR is for fixing dynamicConfigServiceMock was missing error. This PR will import dynamicConfigServiceMock from core/server/mocks directly.

Issues Resolved

#7955

Screenshot

No UI Changes

Testing the changes

  • Clone branch and Run yarn osd bootstrap
  • Run yarn test:jest src/plugins/workspace/server/routes/index.test.ts
  • All cases should be passed

Changelog

  • fix: [Workspace]dynamicConfigServiceMock not found in workspace routes UT

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Lin Wang <wonglam@amazon.com>
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.01%. Comparing base (b370871) to head (1880443).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7954      +/-   ##
==========================================
+ Coverage   60.99%   61.01%   +0.02%     
==========================================
  Files        3684     3685       +1     
  Lines       87141    87142       +1     
  Branches    13403    13403              
==========================================
+ Hits        53151    53170      +19     
+ Misses      30775    30754      -21     
- Partials     3215     3218       +3     
Flag Coverage Δ
Linux_1 29.37% <ø> (?)
Linux_2 56.22% <ø> (ø)
Linux_3 37.82% <ø> (ø)
Linux_4 29.58% <ø> (ø)
Windows_1 29.38% <ø> (+0.44%) ⬆️
Windows_2 56.17% <ø> (ø)
Windows_3 37.82% <ø> (ø)
Windows_4 29.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Hailong-am Hailong-am left a comment

Choose a reason for hiding this comment

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

thanks

@SuZhou-Joe SuZhou-Joe merged commit 976c567 into opensearch-project:main Sep 2, 2024
73 of 75 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7954-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 976c5677fa27a440e88924a658435329d02b3f56
# Push it to GitHub
git push --set-upstream origin backport/backport-7954-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-7954-to-2.x.

wanglam added a commit to wanglam/OpenSearch-Dashboards that referenced this pull request Sep 4, 2024
…es UT (opensearch-project#7954)

* Fix dynamicConfigServiceMock import path in workspace routes UT

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR opensearch-project#7954 created/updated

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Sep 4, 2024
* [Workspace]Validate features parameter in workspace create and update API (#7884)

* Add validate for features field in workspace create and update API

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #7884 created/updated

* Changeset file for PR #7884 created/updated

* Move router outside align with other plugins

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add ut and fix integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Import use case id from default nav groups

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace routes UT

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Share feature config generator between publicn and server

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix osd server crashed due to import from public

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* [Workspace]Fix dynamicConfigServiceMock import path in workspace routes UT (#7954)

* Fix dynamicConfigServiceMock import path in workspace routes UT

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #7954 created/updated

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2024
* [Workspace]Validate features parameter in workspace create and update API (#7884)

* Add validate for features field in workspace create and update API

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #7884 created/updated

* Changeset file for PR #7884 created/updated

* Move router outside align with other plugins

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add ut and fix integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Import use case id from default nav groups

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace routes UT

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Share feature config generator between publicn and server

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix osd server crashed due to import from public

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* [Workspace]Fix dynamicConfigServiceMock import path in workspace routes UT (#7954)

* Fix dynamicConfigServiceMock import path in workspace routes UT

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #7954 created/updated

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit d3ce40f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Sep 6, 2024
* [Workspace]Validate features parameter in workspace create and update API (#7884)

* Add validate for features field in workspace create and update API



* Changeset file for PR #7884 created/updated

* Changeset file for PR #7884 created/updated

* Move router outside align with other plugins



* Add ut and fix integration tests



* Import use case id from default nav groups



* Fix workspace routes UT



* Share feature config generator between publicn and server



* Fix osd server crashed due to import from public



---------




* [Workspace]Fix dynamicConfigServiceMock import path in workspace routes UT (#7954)

* Fix dynamicConfigServiceMock import path in workspace routes UT



* Changeset file for PR #7954 created/updated

---------




---------



(cherry picked from commit d3ce40f)

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants