Skip to content

Commit

Permalink
chore: update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed May 21, 2024
1 parent eb947f9 commit 37c3c59
Show file tree
Hide file tree
Showing 43 changed files with 150 additions and 150 deletions.
4 changes: 2 additions & 2 deletions turborepo-tests/integration/tests/dry-json/monorepo.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Setup
"taskId": "my-app#build",
"task": "build",
"package": "my-app",
"hash": "dea27cc2fbbcfe2c",
"hash": "709525604475409a",
"inputs": {
".env.local": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"package.json": "1746e0db2361085b5953a6a3beab08c24af5bc08"
Expand Down Expand Up @@ -113,7 +113,7 @@ Setup
"taskId": "util#build",
"task": "build",
"package": "util",
"hash": "e09943c27ed0a75d",
"hash": "98d1cf4886bbc73d",
"inputs": {
"package.json": "e755064fd7893809d10fc067bb409c7ae516327f"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Setup
{
"taskId": "build",
"task": "build",
"hash": "64c6a531cb00bb47",
"hash": "9cff709a1e22ead6",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup
"turboVersion": "[a-z0-9\.-]+", (re)
"monorepo": false,
"globalCacheInputs": {
"rootKey": "HEY STELLLLLLLAAAAAAAAAAAAA",
"rootKey": "I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here", (esc)
"files": {
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
"package.json": "8606ff4b95a5330740d8d9d0948faeada64f1f32",
Expand All @@ -26,13 +26,13 @@ Setup
"passthrough": null
}
},
"envMode": "infer",
"envMode": "strict",
"frameworkInference": true,
"tasks": [
{
"taskId": "build",
"task": "build",
"hash": "e48ea8d453fe3216",
"hash": "b69493e87ea97b0e",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down Expand Up @@ -74,7 +74,7 @@ Setup
},
"expandedOutputs": [],
"framework": "",
"envMode": "loose",
"envMode": "strict",
"environmentVariables": {
"specified": {
"env": [],
Expand All @@ -89,7 +89,7 @@ Setup
{
"taskId": "test",
"task": "test",
"hash": "92fa9e0daec0e1ec",
"hash": "29571ce1244345cc",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down Expand Up @@ -129,7 +129,7 @@ Setup
},
"expandedOutputs": [],
"framework": "",
"envMode": "loose",
"envMode": "strict",
"environmentVariables": {
"specified": {
"env": [],
Expand Down
8 changes: 4 additions & 4 deletions turborepo-tests/integration/tests/dry-json/single-package.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup
"turboVersion": "[a-z0-9\.-]+", (re)
"monorepo": false,
"globalCacheInputs": {
"rootKey": "HEY STELLLLLLLAAAAAAAAAAAAA",
"rootKey": "I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here", (esc)
"files": {
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
"package.json": "8606ff4b95a5330740d8d9d0948faeada64f1f32",
Expand All @@ -26,13 +26,13 @@ Setup
"passthrough": null
}
},
"envMode": "infer",
"envMode": "strict",
"frameworkInference": true,
"tasks": [
{
"taskId": "build",
"task": "build",
"hash": "e48ea8d453fe3216",
"hash": "b69493e87ea97b0e",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down Expand Up @@ -72,7 +72,7 @@ Setup
},
"expandedOutputs": [],
"framework": "",
"envMode": "loose",
"envMode": "strict",
"environmentVariables": {
"specified": {
"env": [],
Expand Down
4 changes: 2 additions & 2 deletions turborepo-tests/integration/tests/dry-run.t
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Setup
my-app#build
Task = build\s* (re)
Package = my-app\s* (re)
Hash = dea27cc2fbbcfe2c
Hash = 709525604475409a
Cached \(Local\) = false\s* (re)
Cached \(Remote\) = false\s* (re)
Directory = apps(\/|\\)my-app\s* (re)
Expand All @@ -52,7 +52,7 @@ Setup
util#build
Task = build\s* (re)
Package = util\s* (re)
Hash = e09943c27ed0a75d
Hash = 98d1cf4886bbc73d
Cached \(Local\) = false\s* (re)
Cached \(Remote\) = false\s* (re)
Directory = packages(\/|\\)util\s* (re)
Expand Down
30 changes: 15 additions & 15 deletions turborepo-tests/integration/tests/edit-turbo-json/task.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,63 @@ Baseline task hashes
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "39902e236d45b17a"
"hash": "843536e46620dad2"
}
{
"taskId": "my-app#build",
"hash": "8f74c4a19d54432c"
"hash": "bbfabe4612171fc1"
}
{
"taskId": "util#build",
"hash": "e09943c27ed0a75d"
"hash": "98d1cf4886bbc73d"
}

Change only my-app#build
$ cp "$TESTDIR/fixture-configs/b-change-only-my-app.json" "$(pwd)/turbo.json" && git commit -am "no comment" --quiet
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "39902e236d45b17a"
"hash": "843536e46620dad2"
}
{
"taskId": "my-app#build",
"hash": "c741bcbd31d15d60"
"hash": "0455e87c8abba36d"
}
{
"taskId": "util#build",
"hash": "e09943c27ed0a75d"
"hash": "98d1cf4886bbc73d"
}

Change my-app#build dependsOn
$ cp "$TESTDIR/fixture-configs/c-my-app-depends-on.json" "$(pwd)/turbo.json" && git commit -am "no comment" --quiet
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "39902e236d45b17a"
"hash": "843536e46620dad2"
}
{
"taskId": "my-app#build",
"hash": "6553128bdbc1036d"
"hash": "8d584a4d18836787"
}
{
"taskId": "util#build",
"hash": "e09943c27ed0a75d"
"hash": "98d1cf4886bbc73d"
}

Non-materially modifying the dep graph does nothing.
$ cp "$TESTDIR/fixture-configs/d-depends-on-util.json" "$(pwd)/turbo.json" && git commit -am "no comment" --quiet
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "39902e236d45b17a"
"hash": "843536e46620dad2"
}
{
"taskId": "my-app#build",
"hash": "6553128bdbc1036d"
"hash": "8d584a4d18836787"
}
{
"taskId": "util#build",
"hash": "e09943c27ed0a75d"
"hash": "98d1cf4886bbc73d"
}


Expand All @@ -71,13 +71,13 @@ Change util#build impacts itself and my-app
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "39902e236d45b17a"
"hash": "843536e46620dad2"
}
{
"taskId": "my-app#build",
"hash": "fa0fd889b37b9c1b"
"hash": "239ff972999c4203"
}
{
"taskId": "util#build",
"hash": "b781fbdbf3ba6a42"
"hash": "70eb762a20d17252"
}
4 changes: 2 additions & 2 deletions turborepo-tests/integration/tests/global-deps.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Run a build
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache miss, executing 4dd187491a8e9350
my-app:build: cache miss, executing 8ce6d80ebce687e0

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -18,7 +18,7 @@ Run a build
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache miss, executing 0ba77ba531e887b6
my-app:build: cache miss, executing dca16ac82b573af3

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand Down
10 changes: 5 additions & 5 deletions turborepo-tests/integration/tests/global-env.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing e09943c27ed0a75d
util:build: cache miss, executing 98d1cf4886bbc73d

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -19,7 +19,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache hit, suppressing logs e09943c27ed0a75d
util:build: cache hit, suppressing logs 98d1cf4886bbc73d

Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Expand All @@ -30,7 +30,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing e6d215bd0e04445d
util:build: cache miss, executing fd5eb989bf579fe7

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -41,7 +41,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache hit, suppressing logs e09943c27ed0a75d
util:build: cache hit, suppressing logs 98d1cf4886bbc73d

Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Expand All @@ -52,7 +52,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing f046d9ba285790de
util:build: cache miss, executing b3b1254eccf353e4

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
\xe2\x80\xa2 Packages in scope: app-a, pkg-a (esc)
\xe2\x80\xa2 Running dev in 2 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
app-a:dev: cache miss, executing 97835a4c9c3d1c42
app-a:dev: cache miss, executing 62f94dc00b6e5279
app-a:dev:
app-a:dev: > dev
app-a:dev: > echo dev-app-a
Expand Down
2 changes: 1 addition & 1 deletion turborepo-tests/integration/tests/pkg-inference.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing e09943c27ed0a75d
util:build: cache miss, executing 98d1cf4886bbc73d
util:build:
util:build: > build
util:build: > echo building
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Make sure that the internal util package is part of the prune output
\xe2\x80\xa2 Packages in scope: docs, shared, util (esc)
\xe2\x80\xa2 Running new-task in 3 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
docs:new-task: cache miss, executing 0fb91dc0d3d46797
docs:new-task: cache miss, executing 447a2edb51632766
docs:new-task:
docs:new-task: > docs@ new-task .*out(\/|\\)apps(\/|\\)docs (re)
docs:new-task: > echo building
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Running build for my-app succeeds
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache miss, executing c7c1a62f2eb0bc91
my-app:build: cache miss, executing 2e754412fe1f3a79
my-app:build:
my-app:build: > build
my-app:build: > echo building
Expand All @@ -26,7 +26,7 @@ Update exluded file and try again
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache hit, replaying logs c7c1a62f2eb0bc91
my-app:build: cache hit, replaying logs 2e754412fe1f3a79
my-app:build:
my-app:build: > build
my-app:build: > echo building
Expand Down
4 changes: 2 additions & 2 deletions turborepo-tests/integration/tests/run-logging/errors-only.t
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Setup
\xe2\x80\xa2 Packages in scope: app-a (esc)
\xe2\x80\xa2 Running builderror in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
app-a:builderror: cache miss, executing 1da6f0a01cdeec30
app-a:builderror: cache miss, executing 93153e69f7b02624
app-a:builderror:
app-a:builderror: > builderror
app-a:builderror: > echo error-builderror-app-a && exit 1
Expand Down Expand Up @@ -67,7 +67,7 @@ Setup
\xe2\x80\xa2 Packages in scope: app-a (esc)
\xe2\x80\xa2 Running builderror2 in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
app-a:builderror2: cache miss, executing 432a3179a586f316
app-a:builderror2: cache miss, executing def3fe0b9514cd39
app-a:builderror2:
app-a:builderror2: > builderror2
app-a:builderror2: > echo error-builderror2-app-a && exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ because otherwise prysk interprets them as multiline commands
\xe2\x80\xa2 Running build in 2 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
::group::my-app:build
cache bypass, force executing 7727324039284236
cache bypass, force executing a7563b5dee763172

>\sbuild (re)
\>\secho building && sleep 1 && echo done (re)
Expand All @@ -18,7 +18,7 @@ because otherwise prysk interprets them as multiline commands
done
::endgroup::
::group::util:build
cache bypass, force executing a7dd27708069cde0
cache bypass, force executing 5cbbbb3f7adc395b

>\sbuild (re)
\>\ssleep 0.5 && echo building && sleep 1 && echo completed (re)
Expand All @@ -37,7 +37,7 @@ because otherwise prysk interprets them as multiline commands
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
::group::util:build
util:build: cache bypass, force executing a7dd27708069cde0
util:build: cache bypass, force executing 5cbbbb3f7adc395b
util:build:
util:build: > build
util:build: > sleep 0.5 && echo building && sleep 1 && echo completed
Expand All @@ -57,7 +57,7 @@ Verify that errors are grouped properly
\xe2\x80\xa2 Running fail in 2 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
\x1b[;31mutil:fail\x1b[;0m (esc)
cache miss, executing 38275ed800694fd2
cache miss, executing fe8b225c95f582d0

\> fail (re)
\> echo failing; exit 1 (re)
Expand Down
Loading

0 comments on commit 37c3c59

Please sign in to comment.