-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Creasy <[email protected]>
- Loading branch information
1 parent
d600520
commit 4fa0182
Showing
20 changed files
with
140 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import ( | |
"context" | ||
"encoding/json" | ||
"github.com/kubeflow/model-registry/ui/bff/internal/config" | ||
"github.com/kubeflow/model-registry/ui/bff/internal/constants" | ||
"github.com/kubeflow/model-registry/ui/bff/internal/mocks" | ||
"github.com/kubeflow/model-registry/ui/bff/internal/models" | ||
"github.com/kubeflow/model-registry/ui/bff/internal/repositories" | ||
|
@@ -31,7 +32,7 @@ var _ = Describe("TestNamespacesHandler", func() { | |
It("should return only dora-namespace for [email protected]", func() { | ||
By("creating the HTTP request with the kubeflow-userid header") | ||
req, err := http.NewRequest(http.MethodGet, NamespaceListPath, nil) | ||
ctx := context.WithValue(req.Context(), KubeflowUserIdKey, mocks.DoraNonAdminUser) | ||
ctx := context.WithValue(req.Context(), constants.KubeflowUserIdKey, mocks.DoraNonAdminUser) | ||
req = req.WithContext(ctx) | ||
Expect(err).NotTo(HaveOccurred()) | ||
rr := httptest.NewRecorder() | ||
|
@@ -57,7 +58,7 @@ var _ = Describe("TestNamespacesHandler", func() { | |
It("should return all namespaces for [email protected]", func() { | ||
By("creating the HTTP request with the kubeflow-userid header") | ||
req, err := http.NewRequest(http.MethodGet, NamespaceListPath, nil) | ||
ctx := context.WithValue(req.Context(), KubeflowUserIdKey, mocks.KubeflowUserIDHeaderValue) | ||
ctx := context.WithValue(req.Context(), constants.KubeflowUserIdKey, mocks.KubeflowUserIDHeaderValue) | ||
req = req.WithContext(ctx) | ||
Expect(err).NotTo(HaveOccurred()) | ||
req.Header.Set("kubeflow-userid", "[email protected]") | ||
|
@@ -87,7 +88,7 @@ var _ = Describe("TestNamespacesHandler", func() { | |
It("should return no namespaces for non-existent user", func() { | ||
By("creating the HTTP request with a non-existent kubeflow-userid") | ||
req, err := http.NewRequest(http.MethodGet, NamespaceListPath, nil) | ||
ctx := context.WithValue(req.Context(), KubeflowUserIdKey, "[email protected]") | ||
ctx := context.WithValue(req.Context(), constants.KubeflowUserIdKey, "[email protected]") | ||
req = req.WithContext(ctx) | ||
Expect(err).NotTo(HaveOccurred()) | ||
rr := httptest.NewRecorder() | ||
|
Oops, something went wrong.