mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	debugged startupshutdown.go
This commit is contained in:
		
							parent
							
								
									19148eba44
								
							
						
					
					
						commit
						78d857a374
					
				@ -22,7 +22,7 @@ func TestStartup(t *testing.T) {
 | 
				
			|||||||
	testDir := filepath.Join(tempDirPath, "temp_dir_for_testing_startupshutdown.go")
 | 
						testDir := filepath.Join(tempDirPath, "temp_dir_for_testing_startupshutdown.go")
 | 
				
			||||||
	osSenitiveTestDir := filepath.FromSlash(testDir)
 | 
						osSenitiveTestDir := filepath.FromSlash(testDir)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	exec.Command("rm", "-r", osSenitiveTestDir).Start() // removes osSenitiveTestDir from the OS's temp directory, if the osSenitiveTestDir already exists
 | 
						exec.Command("rm", "-r", osSenitiveTestDir).Run() // removes osSenitiveTestDir from the OS's temp directory, if the osSenitiveTestDir already exists
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tests := []struct {
 | 
						tests := []struct {
 | 
				
			||||||
		input              string
 | 
							input              string
 | 
				
			||||||
@ -33,7 +33,7 @@ func TestStartup(t *testing.T) {
 | 
				
			|||||||
		{"startup mkdir " + osSenitiveTestDir, false, false},
 | 
							{"startup mkdir " + osSenitiveTestDir, false, false},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// test case #1 tests proper functionality of non-blocking commands
 | 
							// test case #1 tests proper functionality of non-blocking commands
 | 
				
			||||||
		{"startup mkdir " + osSenitiveTestDir, false, true},
 | 
							{"startup mkdir " + osSenitiveTestDir + " &", false, true},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// test case #2 tests handling of non-existant commands
 | 
							// test case #2 tests handling of non-existant commands
 | 
				
			||||||
		{"startup " + strconv.Itoa(int(time.Now().UnixNano())), true, true},
 | 
							{"startup " + strconv.Itoa(int(time.Now().UnixNano())), true, true},
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user