-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: integration tests for tarring/unfurling (#21544)
- Loading branch information
1 parent
86769b0
commit bbf8f69
Showing
9 changed files
with
110 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. | ||
|
||
static TEST_REGISTRY_URL: &str = "http://127.0.0.1:4250"; | ||
|
||
pub fn env_vars_for_registry() -> Vec<(String, String)> { | ||
vec![ | ||
( | ||
"DENO_REGISTRY_URL".to_string(), | ||
TEST_REGISTRY_URL.to_string(), | ||
), | ||
( | ||
"DENO_REGISTRY_API_URL".to_string(), | ||
TEST_REGISTRY_URL.to_string(), | ||
), | ||
] | ||
} | ||
|
||
itest!(no_token { | ||
args: "do-not-use-publish publish/missing_deno_json", | ||
output: "publish/no_token.out", | ||
exit_code: 1, | ||
}); | ||
|
||
itest!(missing_deno_json { | ||
args: | ||
"do-not-use-publish --token 'sadfasdf' $TESTDATA/publish/missing_deno_json", | ||
output: "publish/missing_deno_json.out", | ||
exit_code: 1, | ||
temp_cwd: true, | ||
}); | ||
|
||
itest!(successful { | ||
args: "do-not-use-publish --token 'sadfasdf' $TESTDATA/publish/successful", | ||
output: "publish/successful.out", | ||
envs: env_vars_for_registry(), | ||
http_server: true, | ||
temp_cwd: true, | ||
}); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
error: Failed to read deno.json file at [WILDCARD]missing_deno_json[WILDCARD] |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
error: No means to authenticate. Pass a token to `--token`[WILDCARD] |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Publishing @foo/[email protected] ... | ||
Successfully published @foo/[email protected] | ||
http://127.0.0.1:4250/@foo/bar/1.0.0_meta.json |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@foo/bar", | ||
"version": "1.0.0", | ||
"exports": { | ||
".": "./mod.ts" | ||
}, | ||
"imports": { | ||
"@std/http": "jsr:@std/http@1" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import http from "@std/http"; | ||
|
||
export function foobar() { | ||
return http.fileServer; | ||
} |
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