File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -1158,19 +1158,13 @@ extension AllTests.AnalyzerTests {
11581158 }
11591159
11601160 @Test func processingEnvironmentVariable( ) async throws {
1161- let environment = QueueIsolated < [ String : String ] ? > ( nil )
11621161 try await withDependencies {
1163- $0. fileManager. fileExists = { _ in true }
1164- $0. shell. run = { @Sendable _, _, env in
1165- environment. setValue ( env)
1166- return #"{"name":"foo","products":[],"targets":[]}"#
1167- }
1162+ $0. logger = . noop
1163+ $0. shell = . liveValue
11681164 } operation: {
1169- _ = try await Analyze . dumpPackage ( at: " /somepath " )
1170- try environment. withValue {
1171- let keys = try #require( $0? . keys)
1172- #expect( keys. contains ( " SPI_PROCESSING " ) )
1173- }
1165+ @Dependency ( \. shell) var shell
1166+ let res = try await shell. run ( command: . init( command: " printenv " , arguments: [ " SPI_PROCESSING " ] ) , at: " /tmp " )
1167+ #expect( res == " 1 " )
11741168 }
11751169 }
11761170
You can’t perform that action at this time.
0 commit comments