File tree Expand file tree Collapse file tree 4 files changed +1
-39
lines changed Expand file tree Collapse file tree 4 files changed +1
-39
lines changed Original file line number Diff line number Diff line change 39
39
if : ${{ matrix.auth == 'connect' }}
40
40
uses : ./configure # 1password/load-secrets-action/configure@<version>
41
41
with :
42
- connect-host : localhost:8080
42
+ connect-host : http:// localhost:8080
43
43
connect-token : ${{ secrets.OP_CONNECT_TOKEN }}
44
44
- name : Load secrets
45
45
id : load_secrets
Original file line number Diff line number Diff line change @@ -30086,15 +30086,6 @@ const validateAuth = () => {
30086
30086
throw new Error(authErr);
30087
30087
}
30088
30088
const authType = isConnect ? "Connect" : "Service account";
30089
- // Adjust Connect host to have a protocol
30090
- if (process.env[envConnectHost] &&
30091
- // The following lint error is not an issue because we are checking for the presence of the `http://` prefix;
30092
- // we are not using it as an insecure connection protocol to link out to another resource.
30093
- // eslint-disable-next-line no-restricted-syntax
30094
- !process.env[envConnectHost].startsWith("http://") &&
30095
- !process.env[envConnectHost].startsWith("https://")) {
30096
- process.env[envConnectHost] = `http://${process.env[envConnectHost]}`;
30097
- }
30098
30089
core.info(`Authenticated with ${authType}.`);
30099
30090
};
30100
30091
const extractSecret = (envName, shouldExportEnv) => {
Original file line number Diff line number Diff line change @@ -47,23 +47,6 @@ describe("validateAuth", () => {
47
47
expect ( validateAuth ) . toThrowError ( authErr ) ;
48
48
} ) ;
49
49
50
- it ( "should append protocol if Connect host doesn't have it" , ( ) => {
51
- process . env [ envConnectHost ] = "localhost:8080" ;
52
- process . env [ envConnectToken ] = testConnectToken ;
53
- expect ( validateAuth ) . not . toThrowError ( authErr ) ;
54
- // The following lint error is not an issue because we are checking for the presence of the `http://` prefix;
55
- // we are not using it as an insecure connection protocol to link out to another resource.
56
- // eslint-disable-next-line no-restricted-syntax
57
- expect ( process . env [ envConnectHost ] ) . toBe ( "http://localhost:8080" ) ;
58
- } ) ;
59
-
60
- it ( "should not append protocol if Connect host has one" , ( ) => {
61
- process . env [ envConnectHost ] = testConnectHost ;
62
- process . env [ envConnectToken ] = testConnectToken ;
63
- expect ( validateAuth ) . not . toThrowError ( authErr ) ;
64
- expect ( process . env [ envConnectHost ] ) . toBe ( testConnectHost ) ;
65
- } ) ;
66
-
67
50
it ( "should be authenticated as a Connect client" , ( ) => {
68
51
process . env [ envConnectHost ] = testConnectHost ;
69
52
process . env [ envConnectToken ] = testConnectToken ;
Original file line number Diff line number Diff line change @@ -26,18 +26,6 @@ export const validateAuth = (): void => {
26
26
27
27
const authType = isConnect ? "Connect" : "Service account" ;
28
28
29
- // Adjust Connect host to have a protocol
30
- if (
31
- process . env [ envConnectHost ] &&
32
- // The following lint error is not an issue because we are checking for the presence of the `http://` prefix;
33
- // we are not using it as an insecure connection protocol to link out to another resource.
34
- // eslint-disable-next-line no-restricted-syntax
35
- ! process . env [ envConnectHost ] . startsWith ( "http://" ) &&
36
- ! process . env [ envConnectHost ] . startsWith ( "https://" )
37
- ) {
38
- process . env [ envConnectHost ] = `http://${ process . env [ envConnectHost ] } ` ;
39
- }
40
-
41
29
core . info ( `Authenticated with ${ authType } .` ) ;
42
30
} ;
43
31
You can’t perform that action at this time.
0 commit comments