Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
Notification
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
System
Notification
Commits
1f88f4db
Commit
1f88f4db
authored
4 years ago
by
Komal Makkar
Browse files
Options
Downloads
Patches
Plain Diff
403 change
parent
60a5535c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!38
Changes in IT to match Infra
Pipeline
#15735
failed
4 years ago
Stage: review
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java
+29
-0
29 additions, 0 deletions
...engroup/osdu/notification/api/TestPubsubEndpointHMAC.java
with
29 additions
and
0 deletions
testing/notification-test-azure/src/test/java/org/opengroup/osdu/notification/api/TestPubsubEndpointHMAC.java
+
29
−
0
View file @
1f88f4db
...
...
@@ -58,4 +58,33 @@ public class TestPubsubEndpointHMAC extends PubsubEndpointHMACTests {
// If HTTP is a need, corresponding infra changes will be required for this test to function.
return
;
}
// For the following 403 is the expceted result.
// Tracking in Issue: https://community.opengroup.org/osdu/platform/system/notification/-/issues/17
@Test
@Override
public
void
should_return401_when_accessingWithNoAccessCredentials
()
throws
Exception
{
ClientResponse
response
=
descriptor
.
run
(
getArg
(),
testUtils
.
getNoAccessToken
());
assertEquals
(
error
(
response
.
getEntity
(
String
.
class
)),
403
,
response
.
getStatus
());
}
@Test
public
void
should_return401_when_noAccessOnCustomerTenant
()
throws
Exception
{
ClientResponse
response
=
descriptor
.
runOnCustomerTenant
(
getArg
(),
getOsduTenantAdminCredentials
());
assertEquals
(
error
(
response
.
getEntity
(
String
.
class
)),
403
,
response
.
getStatus
());
}
@Test
@Override
public
void
should_return401_when_accessingWithEditorCredentials
()
throws
Exception
{
ClientResponse
response
=
descriptor
.
run
(
getArg
(),
testUtils
.
getEditorToken
());
assertEquals
(
error
(
response
.
getEntity
(
String
.
class
)),
403
,
response
.
getStatus
());
}
@Test
@Override
public
void
should_return401_when_accessingWithAdminCredentials
()
throws
Exception
{
ClientResponse
response
=
descriptor
.
run
(
getArg
(),
testUtils
.
getAdminToken
());
assertEquals
(
error
(
response
.
getEntity
(
String
.
class
)),
403
,
response
.
getStatus
());
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment