mirror of
https://github.com/gradle/actions
synced 2025-01-22 15:22:31 +00:00
Avoid dirty state after unit-test execution
This commit is contained in:
parent
9b415aef98
commit
60b8089f55
4 changed files with 8 additions and 5 deletions
1
sources/test/jest/.gitignore
vendored
Normal file
1
sources/test/jest/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
tmp
|
|
@ -2,11 +2,14 @@ import {GradleStateCache} from "../../src/cache-base"
|
|||
import * as path from 'path'
|
||||
import * as fs from 'fs'
|
||||
|
||||
const testTmp = 'test/jest/tmp'
|
||||
fs.rmSync(testTmp, {recursive: true, force: true})
|
||||
|
||||
describe("--info and --stacktrace", () => {
|
||||
describe("will be created", () => {
|
||||
it("when gradle.properties does not exists", async () => {
|
||||
const emptyGradleHome = 'test/jest/resources/gradle-home/empty'
|
||||
fs.rmSync(path.resolve(emptyGradleHome, "gradle.properties"), {force: true})
|
||||
const emptyGradleHome = `${testTmp}/empty-gradle-home`
|
||||
fs.mkdirSync(emptyGradleHome, {recursive: true})
|
||||
|
||||
const stateCache = new GradleStateCache("ignored", emptyGradleHome)
|
||||
stateCache.configureInfoLogLevel()
|
||||
|
@ -17,7 +20,8 @@ describe("--info and --stacktrace", () => {
|
|||
})
|
||||
describe("will be added", () => {
|
||||
it("and gradle.properties does exists", async () => {
|
||||
const existingGradleHome = 'test/jest/resources/gradle-home/existing'
|
||||
const existingGradleHome = `${testTmp}/existing-gradle-home`
|
||||
fs.mkdirSync(existingGradleHome, {recursive: true})
|
||||
fs.writeFileSync(path.resolve(existingGradleHome, "gradle.properties"), "org.gradle.logging.level=debug\n")
|
||||
|
||||
const stateCache = new GradleStateCache("ignored", existingGradleHome)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
gradle.properties
|
|
@ -1 +0,0 @@
|
|||
org.gradle.logging.level=debug
|
Loading…
Reference in a new issue