mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-31 13:07:46 +09:00 
			
		
		
		
	Set tags as part of handleAuthKeyCommon
This commit is contained in:
		| @@ -260,6 +260,8 @@ func (s *IntegrationCLITestSuite) TestPreAuthKeyCommand() { | ||||
| 				"24h", | ||||
| 				"--output", | ||||
| 				"json", | ||||
| 				"--tags", | ||||
| 				"tag:test1,tag:test2", | ||||
| 			}, | ||||
| 			[]string{}, | ||||
| 		) | ||||
| @@ -333,6 +335,11 @@ func (s *IntegrationCLITestSuite) TestPreAuthKeyCommand() { | ||||
| 		listedPreAuthKeys[4].Expiration.AsTime().Before(time.Now().Add(time.Hour*26)), | ||||
| 	) | ||||
|  | ||||
| 	// Test that tags are present | ||||
| 	for i := 0; i < count; i++ { | ||||
| 		assert.DeepEquals(listedPreAuthKeys[i].AclTags, []string{"tag:test1,", "tag:test2"}) | ||||
| 	} | ||||
|  | ||||
| 	// Expire three keys | ||||
| 	for i := 0; i < 3; i++ { | ||||
| 		_, err := ExecuteCommand( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user