 49af59bfca
			
		
	
	49af59bfca
	
	
	
		
			
			Using the same path for both results in confusing errors when runtime.newBundle() attempts to create the directories for the Task Signed-off-by: Daniel Nephin <dnephin@gmail.com>
		
			
				
	
	
		
			18 lines
		
	
	
		
			352 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			352 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package server
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| 
 | |
| 	"github.com/stretchr/testify/assert"
 | |
| 	"golang.org/x/net/context"
 | |
| )
 | |
| 
 | |
| func TestNewErrorsWithSamePathForRootAndState(t *testing.T) {
 | |
| 	path := "/tmp/path/for/testing"
 | |
| 	_, err := New(context.Background(), &Config{
 | |
| 		Root:  path,
 | |
| 		State: path,
 | |
| 	})
 | |
| 	assert.EqualError(t, err, "root and state must be different paths")
 | |
| }
 |