mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	 a45ba06d02
			
		
	
	a45ba06d02
	
	
	
		
			
			In #20538, I was asked to consider refactoring the new OCI pull code from within the generic machine directory. This is something I had tried when originally coding it but it became apparent that a much larger refactor to prevent circular deps was needed. Because I did not want to pollute the initial PR with that refactor, I asked for the PR to merge first. This is the refactor that needed to be done. Signed-off-by: Brent Baude <bbaude@redhat.com>
		
			
				
	
	
		
			36 lines
		
	
	
		
			519 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			519 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package define
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func Test_artifact_String(t *testing.T) {
 | |
| 	tests := []struct {
 | |
| 		name string
 | |
| 		a    Artifact
 | |
| 		want string
 | |
| 	}{
 | |
| 		{
 | |
| 			name: "qemu",
 | |
| 			a:    Qemu,
 | |
| 			want: "qemu",
 | |
| 		},
 | |
| 		{
 | |
| 			name: "hyperv",
 | |
| 			a:    HyperV,
 | |
| 			want: "hyperv",
 | |
| 		}, {
 | |
| 			name: "applehv",
 | |
| 			a:    AppleHV,
 | |
| 			want: "applehv",
 | |
| 		},
 | |
| 	}
 | |
| 	for _, tt := range tests {
 | |
| 		t.Run(tt.name, func(t *testing.T) {
 | |
| 			if got := tt.a.String(); got != tt.want {
 | |
| 				t.Errorf("String() = %v, want %v", got, tt.want)
 | |
| 			}
 | |
| 		})
 | |
| 	}
 | |
| }
 |