bf9395e022
CI / license-header (push) Has been skipped
CI / e2e-dry-run (push) Has been skipped
CI / fast-gate (push) Failing after 0s
Test PR Label Logic / test-pr-labels (push) Failing after 1s
Skill Format Check / check-format (push) Failing after 2s
CI / security (push) Failing after 5s
CI / unit-test (push) Has been skipped
CI / lint (push) Has been skipped
CI / script-test (push) Has been skipped
CI / deterministic-gate (push) Has been skipped
CI / coverage (push) Has been skipped
CI / results (push) Has been cancelled
CI / deadcode (push) Has been cancelled
CI / e2e-live (push) Has been cancelled
32 lines
886 B
Go
32 lines
886 B
Go
// Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package drive
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
"time"
|
|
|
|
clie2e "github.com/larksuite/cli/tests/cli_e2e"
|
|
)
|
|
|
|
// TestDrive_FilesCreateFolderWorkflow tests the files create_folder resource command.
|
|
func TestDrive_FilesCreateFolderWorkflow(t *testing.T) {
|
|
parentT := t
|
|
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
|
|
t.Cleanup(cancel)
|
|
|
|
suffix := clie2e.GenerateSuffix()
|
|
parentFolderName := "lark-cli-e2e-drive-parent-" + suffix
|
|
folderName := "lark-cli-e2e-drive-folder-" + suffix
|
|
parentFolderToken := createDriveFolder(t, parentT, ctx, parentFolderName, "")
|
|
|
|
t.Run("create_folder as bot", func(t *testing.T) {
|
|
folderToken := createDriveFolder(t, parentT, ctx, folderName, parentFolderToken)
|
|
if folderToken == "" {
|
|
t.Fatalf("folder token should be available")
|
|
}
|
|
})
|
|
}
|