-
Notifications
You must be signed in to change notification settings - Fork 0
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
File Service Config Environments & Provider Types #166
Changes from 6 commits
81b9986
ce9dfef
b949986
c28ba93
43080c7
2d281b4
bfa7bd3
01c2efb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,7 +7,7 @@ import { | |||||||||||||||||||||||||||||||||
import { AppModule } from './../src/app.module'; | ||||||||||||||||||||||||||||||||||
import { Reflector } from '@nestjs/core'; | ||||||||||||||||||||||||||||||||||
import * as request from 'supertest'; | ||||||||||||||||||||||||||||||||||
import { FileProviderProto, ResetProtoFile } from 'juno-proto'; | ||||||||||||||||||||||||||||||||||
import { ResetProtoFile } from 'juno-proto'; | ||||||||||||||||||||||||||||||||||
import * as GRPC from '@grpc/grpc-js'; | ||||||||||||||||||||||||||||||||||
import * as ProtoLoader from '@grpc/proto-loader'; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
|
@@ -73,11 +73,12 @@ beforeEach(async () => { | |||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
describe('File Provider Verification Routes', () => { | ||||||||||||||||||||||||||||||||||
it('Missing provider name file provider without auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: '', | ||||||||||||||||||||||||||||||||||
publicAccessKey: 'Test Public Access Key', | ||||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Request body structure is inconsistent with the valid test case (lines 218-225) which uses nested accessKey object
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review was wrong (it should be what you put) but it does seem like we have the wrong access key format in several of the e2e tests (nested)--could you take a look? |
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -87,11 +88,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing public access key file provider without auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: 'Test Provider', | ||||||||||||||||||||||||||||||||||
publicAccessKey: '', | ||||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -101,11 +103,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing private access key file provider without auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: 'Test Provider', | ||||||||||||||||||||||||||||||||||
publicAccessKey: 'Test Public Access Key', | ||||||||||||||||||||||||||||||||||
privateAccessKey: '', | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -115,11 +118,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing base url file provider without auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: 'Test Provider', | ||||||||||||||||||||||||||||||||||
publicAccessKey: 'Test Public Access Key', | ||||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
baseUrl: '', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -136,6 +140,7 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -145,11 +150,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing provider name file provider with auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: '', | ||||||||||||||||||||||||||||||||||
publicAccessKey: 'Test Public Access Key', | ||||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -160,11 +166,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing public access key file provider with auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: 'Test Provider', | ||||||||||||||||||||||||||||||||||
publicAccessKey: '', | ||||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -175,11 +182,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing private access key file provider with auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: 'Test Provider', | ||||||||||||||||||||||||||||||||||
publicAccessKey: 'Test Public Access Key', | ||||||||||||||||||||||||||||||||||
privateAccessKey: '', | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -190,11 +198,12 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
it('Missing base url file provider with auth key', () => { | ||||||||||||||||||||||||||||||||||
const fileProviderBody: FileProviderProto.RegisterProviderRequest = { | ||||||||||||||||||||||||||||||||||
const fileProviderBody = { | ||||||||||||||||||||||||||||||||||
providerName: 'Test Provider', | ||||||||||||||||||||||||||||||||||
publicAccessKey: 'Test Public Access Key', | ||||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
baseUrl: '', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
@@ -212,6 +221,7 @@ describe('File Provider Verification Routes', () => { | |||||||||||||||||||||||||||||||||
privateAccessKey: 'Test Private Access Key', | ||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||
baseUrl: 'https://aws.amazon.com/s3', | ||||||||||||||||||||||||||||||||||
type: 'S3', | ||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
return request(app.getHttpServer()) | ||||||||||||||||||||||||||||||||||
|
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.
style: Consider adding example values to @ApiProperty to show valid provider types (S3, AZURE)
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.
valid