Compare commits
12 Commits
main
...
flakey-tes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c4d407212 | ||
|
|
22f28a996c | ||
|
|
aa2f0049e1 | ||
|
|
6aab750b7f | ||
|
|
7a62c00073 | ||
|
|
daa2257ff1 | ||
|
|
9f46e184cf | ||
|
|
d4881d1cf0 | ||
|
|
ddf9285791 | ||
|
|
1752d1117f | ||
|
|
ef6ca8583a | ||
|
|
8081ae7349 |
13
.github/actions/backup-restore-test/action.yml
vendored
13
.github/actions/backup-restore-test/action.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: Backup Restore Test
|
||||
description: Run various backup/restore/export tests for a service.
|
||||
|
||||
inputs:
|
||||
service:
|
||||
@ -60,7 +59,7 @@ runs:
|
||||
CATEGORY_SUFFIX=""
|
||||
[[ -n "${{ inputs.category }}" ]] && CATEGORY_SUFFIX="-${{ inputs.category }}"
|
||||
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-${{ inputs.service }}${CATEGORY_SUFFIX}-backup-${{inputs.kind }}.log
|
||||
./corso backup create '${{ inputs.service }}' \
|
||||
./canario backup create '${{ inputs.service }}' \
|
||||
--no-stats --hide-progress --json \
|
||||
${{ inputs.backup-args }} |
|
||||
tee /dev/stderr | # for printing logs
|
||||
@ -81,7 +80,7 @@ runs:
|
||||
CATEGORY_SUFFIX=""
|
||||
[[ -n "${{ inputs.category }}" ]] && CATEGORY_SUFFIX="-${{ inputs.category }}"
|
||||
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-${{ inputs.service }}${CATEGORY_SUFFIX}-restore-${{inputs.kind }}.log
|
||||
./corso restore '${{ inputs.service }}' \
|
||||
./canario restore '${{ inputs.service }}' \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--collisions ${{ inputs.on-collision }} \
|
||||
@ -129,7 +128,7 @@ runs:
|
||||
CATEGORY_SUFFIX=""
|
||||
[[ -n "${{ inputs.category }}" ]] && CATEGORY_SUFFIX="-${{ inputs.category }}"
|
||||
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-${{ inputs.service }}${CATEGORY_SUFFIX}-restore-${{inputs.kind }}.log
|
||||
./corso export '${{ inputs.service }}' \
|
||||
./canario export '${{ inputs.service }}' \
|
||||
/tmp/export-${{ inputs.service }}${CATEGORY_SUFFIX}-${{inputs.kind }} \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
@ -171,7 +170,7 @@ runs:
|
||||
CATEGORY_SUFFIX=""
|
||||
[[ -n "${{ inputs.category }}" ]] && CATEGORY_SUFFIX="-${{ inputs.category }}"
|
||||
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-${{ inputs.service }}${CATEGORY_SUFFIX}-restore-${{inputs.kind }}.log
|
||||
./corso export '${{ inputs.service }}' \
|
||||
./canario export '${{ inputs.service }}' \
|
||||
/tmp/export-${{ inputs.service }}${CATEGORY_SUFFIX}-${{inputs.kind }}-archive \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
@ -214,7 +213,7 @@ runs:
|
||||
CATEGORY_SUFFIX=""
|
||||
[[ -n "${{ inputs.category }}" ]] && CATEGORY_SUFFIX="-${{ inputs.category }}"
|
||||
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-backup-${{ inputs.service }}${CATEGORY_SUFFIX}-list-${{inputs.kind }}.log
|
||||
./corso backup list ${{ inputs.service }} \
|
||||
./canario backup list ${{ inputs.service }} \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
2>&1 |
|
||||
@ -238,7 +237,7 @@ runs:
|
||||
CATEGORY_SUFFIX=""
|
||||
[[ -n "${{ inputs.category }}" ]] && CATEGORY_SUFFIX="-${{ inputs.category }}"
|
||||
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-backup-list-${{ inputs.service }}${CATEGORY_SUFFIX}-single-${{inputs.kind }}.log
|
||||
./corso backup list ${{ inputs.service }} \
|
||||
./canario backup list ${{ inputs.service }} \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--backup "${{ steps.backup.outputs.result }}" \
|
||||
|
||||
1
.github/actions/go-setup-cache/action.yml
vendored
1
.github/actions/go-setup-cache/action.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: Setup and Cache Golang
|
||||
description: Build golang binaries for later use in CI.
|
||||
|
||||
# clone of: https://github.com/magnetikonline/action-golang-cache/blob/main/action.yaml
|
||||
#
|
||||
|
||||
36
.github/actions/publish-binary/action.yml
vendored
36
.github/actions/publish-binary/action.yml
vendored
@ -1,5 +1,13 @@
|
||||
name: Publish Binary
|
||||
description: Publish binary artifacts.
|
||||
|
||||
###################################
|
||||
# notice:
|
||||
# This file has undergone major
|
||||
# renaming for the canario fork.
|
||||
# In case of re-incorporation back
|
||||
# to corso, this refactoring will
|
||||
# need to be undone.
|
||||
###################################
|
||||
|
||||
inputs:
|
||||
version:
|
||||
@ -41,36 +49,36 @@ runs:
|
||||
workdir: src
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.github_token }}
|
||||
RUDDERSTACK_CORSO_WRITE_KEY: ${{ inputs.rudderstack_write_key }}
|
||||
RUDDERSTACK_CORSO_DATA_PLANE_URL: ${{ inputs.rudderstack_data_plane_url }}
|
||||
CORSO_VERSION: ${{ inputs.version }}
|
||||
RUDDERSTACK_CANARIO_WRITE_KEY: ${{ inputs.rudderstack_write_key }}
|
||||
RUDDERSTACK_CANARIO_DATA_PLANE_URL: ${{ inputs.rudderstack_data_plane_url }}
|
||||
CANARIO_VERSION: ${{ inputs.version }}
|
||||
|
||||
- name: Upload darwin arm64
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: corso_Darwin_arm64
|
||||
path: src/dist/corso_darwin_arm64/corso
|
||||
name: canario_Darwin_arm64
|
||||
path: src/dist/canario_darwin_arm64/canario
|
||||
|
||||
- name: Upload linux arm64
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: corso_Linux_arm64
|
||||
path: src/dist/corso_linux_arm64/corso
|
||||
name: canario_Linux_arm64
|
||||
path: src/dist/canario_linux_arm64/canario
|
||||
|
||||
- name: Upload darwin amd64
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: corso_Darwin_amd64
|
||||
path: src/dist/corso_darwin_amd64_v1/corso
|
||||
name: canario_Darwin_amd64
|
||||
path: src/dist/canario_darwin_amd64_v1/canario
|
||||
|
||||
- name: Upload linux amd64
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: corso_Linux_amd64
|
||||
path: src/dist/corso_linux_amd64_v1/corso
|
||||
name: canario_Linux_amd64
|
||||
path: src/dist/canario_linux_amd64_v1/canario
|
||||
|
||||
- name: Upload windows amd64
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: corso_Windows_amd64
|
||||
path: src/dist/corso_windows_amd64_v1/corso.exe
|
||||
name: canario_Windows_amd64
|
||||
path: src/dist/canario_windows_amd64_v1/canario.exe
|
||||
|
||||
3
.github/actions/publish-website/action.yml
vendored
3
.github/actions/publish-website/action.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: Publish Website
|
||||
description: Publish website artifacts.
|
||||
|
||||
inputs:
|
||||
aws-iam-role:
|
||||
@ -24,7 +23,7 @@ runs:
|
||||
uses: aws-actions/configure-aws-credentials@v2
|
||||
with:
|
||||
role-to-assume: ${{ inputs.aws-iam-role }}
|
||||
role-session-name: integration-testing
|
||||
role-session-name: canario-integration-testing
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Add rotbots.txt
|
||||
|
||||
44
.github/actions/purge-m365-data/action.yml
vendored
44
.github/actions/purge-m365-data/action.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: Purge M365 User Data
|
||||
description: Deletes M365 data generated during CI tests.
|
||||
|
||||
# Hard deletion of an m365 user's data. Our CI processes create a lot
|
||||
# of data churn (creation and immediate deletion) of files, the likes
|
||||
@ -31,19 +30,12 @@ inputs:
|
||||
description: Secret value of for AZURE_CLIENT_ID
|
||||
azure-client-secret:
|
||||
description: Secret value of for AZURE_CLIENT_SECRET
|
||||
azure-pnp-client-id:
|
||||
description: Secret value of AZURE_PNP_CLIENT_ID
|
||||
azure-pnp-client-cert:
|
||||
description: Base64 encoded private certificate for the azure-pnp-client-id (Secret value of AZURE_PNP_CLIENT_CERT)
|
||||
azure-tenant-id:
|
||||
description: Secret value of AZURE_TENANT_ID
|
||||
description: Secret value of for AZURE_TENANT_ID
|
||||
m365-admin-user:
|
||||
description: Secret value of for M365_TENANT_ADMIN_USER
|
||||
m365-admin-password:
|
||||
description: Secret value of for M365_TENANT_ADMIN_PASSWORD
|
||||
tenant-domain:
|
||||
description: The domain of the tenant (ex. 10rqc2.onmicrosft.com)
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@ -61,13 +53,7 @@ runs:
|
||||
AZURE_CLIENT_ID: ${{ inputs.azure-client-id }}
|
||||
AZURE_CLIENT_SECRET: ${{ inputs.azure-client-secret }}
|
||||
AZURE_TENANT_ID: ${{ inputs.azure-tenant-id }}
|
||||
run: |
|
||||
for ($ATTEMPT_NUM = 1; $ATTEMPT_NUM -le 3; $ATTEMPT_NUM++)
|
||||
{
|
||||
if (./exchangePurge.ps1 -User ${{ inputs.user }} -FolderNamePurgeList PersonMetadata -FolderPrefixPurgeList "${{ inputs.folder-prefix }}".Split(",") -PurgeBeforeTimestamp ${{ inputs.older-than }}) {
|
||||
break
|
||||
}
|
||||
}
|
||||
run: ./exchangePurge.ps1 -User ${{ inputs.user }} -FolderNamePurgeList PersonMetadata -FolderPrefixPurgeList "${{ inputs.folder-prefix }}".Split(",") -PurgeBeforeTimestamp ${{ inputs.older-than }}
|
||||
|
||||
# TODO(ashmrtn): Re-enable when we figure out errors we're seeing with Get-Mailbox call.
|
||||
#- name: Reset retention for all mailboxes to 0
|
||||
@ -88,16 +74,10 @@ runs:
|
||||
shell: pwsh
|
||||
working-directory: ./src/cmd/purge/scripts
|
||||
env:
|
||||
AZURE_CLIENT_ID: ${{ inputs.azure-pnp-client-id }}
|
||||
AZURE_APP_CERT: ${{ inputs.azure-pnp-client-cert }}
|
||||
TENANT_DOMAIN: ${{ inputs.tenant-domain }}
|
||||
M365_TENANT_ADMIN_USER: ${{ inputs.m365-admin-user }}
|
||||
M365_TENANT_ADMIN_PASSWORD: ${{ inputs.m365-admin-password }}
|
||||
run: |
|
||||
for ($ATTEMPT_NUM = 1; $ATTEMPT_NUM -le 3; $ATTEMPT_NUM++)
|
||||
{
|
||||
if (./onedrivePurge.ps1 -User ${{ inputs.user }} -FolderPrefixPurgeList "${{ inputs.folder-prefix }}".Split(",") -PurgeBeforeTimestamp ${{ inputs.older-than }}) {
|
||||
break
|
||||
}
|
||||
}
|
||||
./onedrivePurge.ps1 -User ${{ inputs.user }} -FolderPrefixPurgeList "${{ inputs.folder-prefix }}".Split(",") -PurgeBeforeTimestamp ${{ inputs.older-than }}
|
||||
|
||||
################################################################################################################
|
||||
# Sharepoint
|
||||
@ -108,14 +88,6 @@ runs:
|
||||
shell: pwsh
|
||||
working-directory: ./src/cmd/purge/scripts
|
||||
env:
|
||||
AZURE_CLIENT_ID: ${{ inputs.azure-pnp-client-id }}
|
||||
AZURE_APP_CERT: ${{ inputs.azure-pnp-client-cert }}
|
||||
TENANT_DOMAIN: ${{ inputs.tenant-domain }}
|
||||
run: |
|
||||
for ($ATTEMPT_NUM = 1; $ATTEMPT_NUM -le 3; $ATTEMPT_NUM++)
|
||||
{
|
||||
if (./onedrivePurge.ps1 -Site ${{ inputs.site }} -LibraryNameList "${{ inputs.libraries }}".split(",") -FolderPrefixPurgeList ${{ inputs.folder-prefix }} -LibraryPrefixDeleteList ${{ inputs.library-prefix && inputs.library-prefix || '[]' }} -PurgeBeforeTimestamp ${{ inputs.older-than }}) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
M365_TENANT_ADMIN_USER: ${{ inputs.m365-admin-user }}
|
||||
M365_TENANT_ADMIN_PASSWORD: ${{ inputs.m365-admin-password }}
|
||||
run: ./onedrivePurge.ps1 -Site ${{ inputs.site }} -LibraryNameList "${{ inputs.libraries }}".split(",") -FolderPrefixPurgeList ${{ inputs.folder-prefix }} -LibraryPrefixDeleteList ${{ inputs.library-prefix && inputs.library-prefix || '[]' }} -PurgeBeforeTimestamp ${{ inputs.older-than }}
|
||||
|
||||
9
.github/actions/teams-message/action.yml
vendored
9
.github/actions/teams-message/action.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: Send a message to Teams
|
||||
description: Send messages to communication apps.
|
||||
|
||||
inputs:
|
||||
msg:
|
||||
@ -25,9 +24,9 @@ runs:
|
||||
- name: build urls
|
||||
shell: bash
|
||||
run: |
|
||||
echo "logurl=$(printf 'https://github.com/alcionai/corso/actions/runs/%s' ${{ github.run_id }})" >> $GITHUB_ENV
|
||||
echo "commiturl=$(printf 'https://github.com/alcionai/corso/commit/%s' ${{ github.sha }})" >> $GITHUB_ENV
|
||||
echo "refurl=$(printf 'https://github.com/alcionai/corso/%s' ${{ env.trimmed_ref }})" >> $GITHUB_ENV
|
||||
echo "logurl=$(printf 'https://github.com/alcionai/canario/actions/runs/%s' ${{ github.run_id }})" >> $GITHUB_ENV
|
||||
echo "commiturl=$(printf 'https://github.com/alcionai/canario/commit/%s' ${{ github.sha }})" >> $GITHUB_ENV
|
||||
echo "refurl=$(printf 'https://github.com/alcionai/canario/%s' ${{ env.trimmed_ref }})" >> $GITHUB_ENV
|
||||
|
||||
- name: use url or blank val
|
||||
shell: bash
|
||||
@ -57,7 +56,7 @@ runs:
|
||||
"type": "TextBlock",
|
||||
"size": "Medium",
|
||||
"weight": "Bolder",
|
||||
"text": "${{ inputs.msg }}",
|
||||
"text": "Canario - ${{ inputs.msg }}",
|
||||
"color": "Attention"
|
||||
},
|
||||
{
|
||||
|
||||
1
.github/actions/website-linting/action.yml
vendored
1
.github/actions/website-linting/action.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: Lint Website
|
||||
description: Lint website content.
|
||||
|
||||
inputs:
|
||||
version:
|
||||
|
||||
4
.github/workflows/binary-publish.yml
vendored
4
.github/workflows/binary-publish.yml
vendored
@ -29,6 +29,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Publish Binary
|
||||
# canario should never publish
|
||||
if: false
|
||||
uses: ./.github/actions/publish-binary
|
||||
with:
|
||||
version: ${{ needs.SetEnv.outputs.version }}
|
||||
@ -40,5 +42,5 @@ jobs:
|
||||
if: failure()
|
||||
uses: ./.github/actions/teams-message
|
||||
with:
|
||||
msg: "[CORSO FAILED] Publishing Binary"
|
||||
msg: "[FAILED] Publishing Binary"
|
||||
teams_url: ${{ secrets.TEAMS_CORSO_CI_WEBHOOK_URL }}
|
||||
|
||||
111
.github/workflows/ci.yml
vendored
111
.github/workflows/ci.yml
vendored
@ -1,15 +1,15 @@
|
||||
name: Build/Release Corso
|
||||
env:
|
||||
IMAGE_NAME: ghcr.io/alcionai/corso
|
||||
name: Build Canario
|
||||
# holdover from corso
|
||||
# canario should not build any images
|
||||
#env:
|
||||
# IMAGE_NAME: ghcr.io/alcionai/canario
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
merge_group:
|
||||
pull_request:
|
||||
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*.*.*"]
|
||||
|
||||
repository_dispatch:
|
||||
types: [ok-to-test-command]
|
||||
|
||||
@ -30,7 +30,7 @@ jobs:
|
||||
# --- Prechecks and Checkouts ------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
Precheck:
|
||||
uses: alcionai/corso/.github/workflows/_filechange_checker.yml@main
|
||||
uses: alcionai/canario/.github/workflows/_filechange_checker.yml@main
|
||||
|
||||
Checkout:
|
||||
needs: [Precheck]
|
||||
@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
# SetM365App will decide which M365 app to use for this CI run
|
||||
SetM365App:
|
||||
uses: alcionai/corso/.github/workflows/accSelector.yaml@main
|
||||
uses: alcionai/canario/.github/workflows/accSelector.yaml@main
|
||||
|
||||
SetEnv:
|
||||
environment: Testing
|
||||
@ -101,7 +101,14 @@ jobs:
|
||||
echo "website-cfid=ESFTEIYTIP7Y3" | tee -a $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
|
||||
Seeing-Things:
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- shell: bash
|
||||
run: echo "github.event.merge_queue"
|
||||
- shell: bash
|
||||
run: echo ${{ github.event.merge_queue }}
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# --- Website Linting -----------------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
@ -130,7 +137,11 @@ jobs:
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
if: (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') || (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
if: |
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
|| startsWith(github.ref, 'refs/heads/gh-readonly-queue/main')
|
||||
|| github.ref == 'refs/heads/main'
|
||||
|| (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src
|
||||
@ -160,7 +171,7 @@ jobs:
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
|
||||
role-session-name: integration-testing
|
||||
role-session-name: canario-integration-testing
|
||||
aws-region: us-east-1
|
||||
|
||||
# run the tests
|
||||
@ -231,7 +242,7 @@ jobs:
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
|
||||
role-session-name: integration-testing
|
||||
role-session-name: canario-integration-testing
|
||||
aws-region: us-east-1
|
||||
|
||||
# run the tests
|
||||
@ -325,7 +336,9 @@ jobs:
|
||||
Test-Suite-Fork:
|
||||
needs: [Precheck]
|
||||
environment: Testing
|
||||
if: (!startsWith(github.ref , 'refs/tags/') && github.ref != 'refs/heads/main') && (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name != github.repository)
|
||||
# test-suite-fork is a corso build artifact.
|
||||
if: false
|
||||
# if: (!startsWith(github.ref , 'refs/tags/') && github.ref != 'refs/heads/main') && (needs.precheck.outputs.srcfileschanged == 'true' && github.event.pull_request.head.repo.full_name != github.repository)
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
@ -380,7 +393,7 @@ jobs:
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
|
||||
role-session-name: integration-testing
|
||||
role-session-name: canario-integration-testing
|
||||
aws-region: us-east-1
|
||||
|
||||
# run the tests
|
||||
@ -462,8 +475,26 @@ jobs:
|
||||
with:
|
||||
go-version-file: src/go.mod
|
||||
|
||||
- name: Run go generate
|
||||
run: |
|
||||
# Install tools used for generate commands in the repo
|
||||
go generate tools.go
|
||||
# Actually run generate commands in the repo.
|
||||
go generate ./...
|
||||
|
||||
- name: Check for uncommitted changes from generated code
|
||||
run: |
|
||||
changes=$(git status --porcelain)
|
||||
if [[ -n "$changes" ]]; then
|
||||
echo "Uncommitted changes detected:"
|
||||
echo "$changes"
|
||||
echo "Run 'go generate' from backend/functions and commit the changes."
|
||||
exit 1
|
||||
fi
|
||||
echo "No uncommitted changes detected."
|
||||
|
||||
- name: Go Lint
|
||||
uses: golangci/golangci-lint-action@v4
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
# Keep pinned to a verson as sometimes updates will add new lint
|
||||
# failures in unchanged code.
|
||||
@ -477,7 +508,7 @@ jobs:
|
||||
run: go install github.com/google/go-licenses@latest
|
||||
|
||||
- name: Run go-licenses
|
||||
run: go-licenses check github.com/alcionai/corso/src --ignore github.com/alcionai/corso/src
|
||||
run: go-licenses check github.com/alcionai/canario/src --ignore github.com/alcionai/canario/src
|
||||
|
||||
- name: Run staticcheck
|
||||
uses: dominikh/staticcheck-action@v1.3.0
|
||||
@ -571,6 +602,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Publish Binary
|
||||
# canario should never publish
|
||||
if: false
|
||||
uses: ./.github/actions/publish-binary
|
||||
with:
|
||||
version: ${{ needs.SetEnv.outputs.version }}
|
||||
@ -582,7 +615,9 @@ jobs:
|
||||
needs: [Test-Suite-Trusted, Source-Code-Linting, Website-Linting, SetEnv]
|
||||
environment: ${{ needs.SetEnv.outputs.environment }}
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
defaults:
|
||||
run:
|
||||
working-directory: build
|
||||
@ -626,7 +661,7 @@ jobs:
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
CORSO_BUILD_LDFLAGS=-X 'github.com/alcionai/corso/src/internal/events.RudderStackWriteKey=${{ secrets.RUDDERSTACK_CORSO_WRITE_KEY }}' -X 'github.com/alcionai/corso/src/internal/events.RudderStackDataPlaneURL=${{ secrets.RUDDERSTACK_CORSO_DATA_PLANE_URL }}' -X 'github.com/alcionai/corso/src/internal/version.Version=${{ needs.SetEnv.outputs.version }}'
|
||||
CORSO_BUILD_LDFLAGS=-X 'github.com/alcionai/canario/src/internal/events.RudderStackWriteKey=${{ secrets.RUDDERSTACK_CORSO_WRITE_KEY }}' -X 'github.com/alcionai/canario/src/internal/events.RudderStackDataPlaneURL=${{ secrets.RUDDERSTACK_CORSO_DATA_PLANE_URL }}' -X 'github.com/alcionai/canario/src/internal/version.Version=${{ needs.SetEnv.outputs.version }}'
|
||||
# use the github cache
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@ -635,14 +670,16 @@ jobs:
|
||||
needs: [Publish-Binary, Publish-Image, SetEnv]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
CORSO_VERSION: ${{ needs.SetEnv.outputs.version }}
|
||||
steps:
|
||||
- name: Validate x86_64 binary artifacts
|
||||
run: |
|
||||
set -ex
|
||||
curl -L https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_x86_64.tar.gz > corso.tar.gz
|
||||
curl -L https://github.com/alcionai/canario/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_x86_64.tar.gz > corso.tar.gz
|
||||
tar -xf corso.tar.gz
|
||||
./corso --help
|
||||
./corso --version 2>&1 | grep -E "version: ${{ env.CORSO_VERSION }}$"
|
||||
@ -656,7 +693,7 @@ jobs:
|
||||
run: |
|
||||
set -ex
|
||||
sudo apt-get update && sudo apt-get install curl
|
||||
curl -L https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_arm64.tar.gz > corso.tar.gz
|
||||
curl -L https://github.com/alcionai/canario/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_arm64.tar.gz > corso.tar.gz
|
||||
tar -xf corso.tar.gz
|
||||
./corso --help
|
||||
./corso --version 2>&1 | grep -E "version: ${{ env.CORSO_VERSION }}$"
|
||||
@ -665,7 +702,9 @@ jobs:
|
||||
needs: [Publish-Binary, Publish-Image, SetEnv]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
CORSO_VERSION: ${{ needs.SetEnv.outputs.version }}
|
||||
steps:
|
||||
@ -687,21 +726,23 @@ jobs:
|
||||
needs: [Publish-Binary, Publish-Image, SetEnv]
|
||||
environment: Testing
|
||||
runs-on: macos-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
CORSO_VERSION: ${{ needs.SetEnv.outputs.version }}
|
||||
steps:
|
||||
- name: Validate x86_64 binary artifacts
|
||||
run: |
|
||||
set -ex
|
||||
curl -L https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Darwin_x86_64.tar.gz > corso.tar.gz
|
||||
curl -L https://github.com/alcionai/canario/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Darwin_x86_64.tar.gz > corso.tar.gz
|
||||
tar -xf corso.tar.gz
|
||||
./corso --help
|
||||
./corso --version 2>&1 | grep -E "version: ${{ env.CORSO_VERSION }}$"
|
||||
- name: Validate arm64 binary artifacts
|
||||
run: |
|
||||
set -ex
|
||||
curl -L https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Darwin_arm64.tar.gz > corso.tar.gz
|
||||
curl -L https://github.com/alcionai/canario/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Darwin_arm64.tar.gz > corso.tar.gz
|
||||
tar -xf corso.tar.gz
|
||||
# TODO: test/validate arm64 executable once we have arm64 CI
|
||||
|
||||
@ -709,13 +750,15 @@ jobs:
|
||||
needs: [Publish-Binary, Publish-Image, SetEnv]
|
||||
environment: Testing
|
||||
runs-on: windows-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
CORSO_VERSION: ${{ needs.SetEnv.outputs.version }}
|
||||
steps:
|
||||
- name: Validate x86_64 binary artifacts
|
||||
run: |
|
||||
curl -L https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Windows_x86_64.zip -o corso.zip
|
||||
curl -L https://github.com/alcionai/canario/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Windows_x86_64.zip -o corso.zip
|
||||
7z x corso.zip
|
||||
./corso.exe --help
|
||||
./corso.exe --version 2>&1 | grep -E "version: ${{ env.CORSO_VERSION }}$"
|
||||
@ -730,6 +773,8 @@ jobs:
|
||||
- uses: actions/checkout@v4 # need to checkout to make the action available
|
||||
|
||||
- name: Publish website
|
||||
# canario should never publish
|
||||
if: false
|
||||
uses: ./.github/actions/publish-website
|
||||
with:
|
||||
aws-iam-role: ${{ secrets.AWS_IAM_ROLE }}
|
||||
@ -740,12 +785,16 @@ jobs:
|
||||
needs: [SetEnv, Validate-Linux-Artifacts, Validate-MacOS-Artifacts, Validate-Docker-Artifacts, Validate-Windows-Artifacts]
|
||||
environment: ${{ needs.SetEnv.outputs.environment }}
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4 # need to checkout to make the action available
|
||||
|
||||
- name: Publish website
|
||||
# canario should never publish
|
||||
if: false
|
||||
uses: ./.github/actions/publish-website
|
||||
with:
|
||||
aws-iam-role: ${{ secrets.AWS_IAM_ROLE }}
|
||||
@ -756,10 +805,12 @@ jobs:
|
||||
needs: [Publish-Website-Prod, SetEnv]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# canario should never publish
|
||||
if: false
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
CORSO_VERSION: ${{ needs.SetEnv.outputs.version }}
|
||||
steps:
|
||||
- name: Validate docs
|
||||
run: |
|
||||
curl https://corsobackup.io/docs/quickstart/ | grep https://github.com/alcionai/corso/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_x86_64.tar.gz
|
||||
curl https://corsobackup.io/docs/quickstart/ | grep https://github.com/alcionai/canario/releases/download/${{ env.CORSO_VERSION }}/corso_${{ env.CORSO_VERSION }}_Linux_x86_64.tar.gz
|
||||
|
||||
34
.github/workflows/ci_test_cleanup.yml
vendored
34
.github/workflows/ci_test_cleanup.yml
vendored
@ -1,18 +1,28 @@
|
||||
name: CI Test Cleanup
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# neither of the jobs are currently running (corso already runs them),
|
||||
# so this action is turned off until we decide it's needed.
|
||||
# workflow_dispatch:
|
||||
# schedule:
|
||||
# every half hour
|
||||
- cron: "*/30 * * * *"
|
||||
# - cron: "*/30 * * * *"
|
||||
#
|
||||
push:
|
||||
branches:
|
||||
does-not-exist-this-forces-the-action-to-not-run
|
||||
|
||||
jobs:
|
||||
Test-User-Data-Cleanup:
|
||||
environment: Testing
|
||||
# forced off - this is already running in corso
|
||||
# we may need to turn this back on if we elect different
|
||||
# test users compared to the corso repo
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
user: [CORSO_M365_TEST_USER_ID, CORSO_SECONDARY_M365_TEST_USER_ID, ""]
|
||||
user: [ CORSO_M365_TEST_USER_ID, CORSO_SECONDARY_M365_TEST_USER_ID, '' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -33,24 +43,25 @@ jobs:
|
||||
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
||||
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
||||
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
||||
azure-pnp-client-id: ${{ secrets.AZURE_PNP_CLIENT_ID }}
|
||||
azure-pnp-client-cert: ${{ secrets.AZURE_PNP_CLIENT_CERT }}
|
||||
tenant-domain: ${{ vars.TENANT_DOMAIN }}
|
||||
|
||||
- name: Notify failure in teams
|
||||
if: failure()
|
||||
uses: ./.github/actions/teams-message
|
||||
with:
|
||||
msg: "[CORSO FAILED] ${{ vars[matrix.user] }} CI Cleanup"
|
||||
msg: "[FAILED] ${{ vars[matrix.user] }} CI Cleanup"
|
||||
teams_url: ${{ secrets.TEAMS_CORSO_CI_WEBHOOK_URL }}
|
||||
|
||||
Test-Site-Data-Cleanup:
|
||||
environment: Testing
|
||||
# forced off - this is already running in corso
|
||||
# we may need to turn this back on if we elect different
|
||||
# test users compared to the corso repo
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
site: [CORSO_M365_TEST_SITE_URL, CORSO_M365_TEST_GROUPS_SITE_URL]
|
||||
site: [ CORSO_M365_TEST_SITE_URL, CORSO_M365_TEST_GROUPS_SITE_URL ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -73,13 +84,10 @@ jobs:
|
||||
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
||||
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
||||
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
||||
azure-pnp-client-id: ${{ secrets.AZURE_PNP_CLIENT_ID }}
|
||||
azure-pnp-client-cert: ${{ secrets.AZURE_PNP_CLIENT_CERT }}
|
||||
tenant-domain: ${{ vars.TENANT_DOMAIN }}
|
||||
|
||||
- name: Notify failure in teams
|
||||
if: failure()
|
||||
uses: ./.github/actions/teams-message
|
||||
with:
|
||||
msg: "[CORSO FAILED] ${{ vars[matrix.site] }} CI Cleanup"
|
||||
msg: "[FAILED] ${{ vars[matrix.site] }} CI Cleanup"
|
||||
teams_url: ${{ secrets.TEAMS_CORSO_CI_WEBHOOK_URL }}
|
||||
|
||||
3
.github/workflows/load_test.yml
vendored
3
.github/workflows/load_test.yml
vendored
@ -155,6 +155,3 @@ jobs:
|
||||
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
||||
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
||||
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
||||
azure-pnp-client-id: ${{ secrets.AZURE_PNP_CLIENT_ID }}
|
||||
azure-pnp-client-cert: ${{ secrets.AZURE_PNP_CLIENT_CERT }}
|
||||
tenant-domain: ${{ vars.TENANT_DOMAIN }}
|
||||
|
||||
46
.github/workflows/longevity_test.yml
vendored
46
.github/workflows/longevity_test.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
user:
|
||||
description: "User to run longevity test on"
|
||||
description: 'User to run longevity test on'
|
||||
|
||||
permissions:
|
||||
# required to retrieve AWS credentials
|
||||
@ -20,10 +20,10 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
SetM365App:
|
||||
uses: alcionai/corso/.github/workflows/accSelector.yaml@main
|
||||
uses: alcionai/canario/.github/workflows/accSelector.yaml@main
|
||||
|
||||
Longevity-Tests:
|
||||
needs: [SetM365App]
|
||||
needs: [ SetM365App ]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
@ -37,7 +37,7 @@ jobs:
|
||||
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-longevity.log
|
||||
RESTORE_DEST_PFX: Corso_Test_Longevity_
|
||||
TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || vars.CORSO_M365_TEST_USER_ID }}
|
||||
PREFIX: "longevity"
|
||||
PREFIX: 'longevity_canario'
|
||||
|
||||
# Options for retention.
|
||||
RETENTION_MODE: GOVERNANCE
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
git checkout ${{ steps.version.outputs.version }}
|
||||
git checkout ${{ github.ref }} -- .github
|
||||
|
||||
- run: go build -o corso
|
||||
- run: go build -o canario
|
||||
timeout-minutes: 10
|
||||
|
||||
- run: mkdir ${CORSO_LOG_DIR}
|
||||
@ -88,7 +88,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
|
||||
role-session-name: integration-testing
|
||||
role-session-name: canario-integration-testing
|
||||
aws-region: us-east-1
|
||||
|
||||
##########################################################################
|
||||
@ -97,7 +97,7 @@ jobs:
|
||||
- name: Version Test
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
./corso --version | grep -c 'Corso version:'
|
||||
./canario --version | grep -c 'Corso version:'
|
||||
|
||||
- name: Repo init test
|
||||
id: repo-init
|
||||
@ -105,7 +105,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo -e "\nRepo init test\n" >> ${{ env.CORSO_LOG_FILE }}
|
||||
./corso repo init s3 \
|
||||
./canario repo init s3 \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--retention-mode $(echo "${{ env.RETENTION_MODE }}" | tr '[:upper:]' '[:lower:]') \
|
||||
@ -126,7 +126,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo -e "\nRepo connect test\n" >> ${{ env.CORSO_LOG_FILE }}
|
||||
./corso repo connect s3 \
|
||||
./canario repo connect s3 \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--prefix ${{ env.PREFIX }} \
|
||||
@ -147,7 +147,7 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
echo -e "\nBackup Exchange test\n" >> ${CORSO_LOG_FILE}
|
||||
./corso backup create exchange \
|
||||
./canario backup create exchange \
|
||||
--no-stats \
|
||||
--mailbox "${TEST_USER}" \
|
||||
--hide-progress \
|
||||
@ -173,7 +173,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo -e "\nBackup OneDrive test\n" >> ${CORSO_LOG_FILE}
|
||||
./corso backup create onedrive \
|
||||
./canario backup create onedrive \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--user "${TEST_USER}" \
|
||||
@ -199,7 +199,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
echo -e "\nBackup SharePoint test\n" >> ${CORSO_LOG_FILE}
|
||||
|
||||
./corso backup create sharepoint \
|
||||
./canario backup create sharepoint \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--site "${{ vars.CORSO_M365_TEST_SITE_URL }}" \
|
||||
@ -264,9 +264,9 @@ jobs:
|
||||
echo -e "\Export OneDrive test\n" >> ${CORSO_LOG_FILE}
|
||||
|
||||
echo -e "\Export OneDrive test - first entry\n" >> ${CORSO_LOG_FILE}
|
||||
./corso backup list onedrive 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
|
||||
./canario backup list onedrive 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
|
||||
while read -r line; do
|
||||
./corso export onedrive \
|
||||
./canario export onedrive \
|
||||
"/tmp/corso-export--$line" \
|
||||
--no-stats \
|
||||
--backup "$line" \
|
||||
@ -274,9 +274,9 @@ jobs:
|
||||
done
|
||||
|
||||
echo -e "\Export OneDrive test - last entry\n" >> ${CORSO_LOG_FILE}
|
||||
./corso backup list onedrive 2>/dev/null | tail -n1 | awk '{print $1}' |
|
||||
./canario backup list onedrive 2>/dev/null | tail -n1 | awk '{print $1}' |
|
||||
while read -r line; do
|
||||
./corso export onedrive \
|
||||
./canario export onedrive \
|
||||
"/tmp/corso-export--$line" \
|
||||
--no-stats \
|
||||
--backup "$line" \
|
||||
@ -292,9 +292,9 @@ jobs:
|
||||
echo -e "\Export SharePoint test\n" >> ${CORSO_LOG_FILE}
|
||||
|
||||
echo -e "\Export SharePoint test - first entry\n" >> ${CORSO_LOG_FILE}
|
||||
./corso backup list sharepoint 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
|
||||
./canario backup list sharepoint 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
|
||||
while read -r line; do
|
||||
./corso export sharepoint \
|
||||
./canario export sharepoint \
|
||||
"/tmp/corso-export--$line" \
|
||||
--no-stats \
|
||||
--backup "$line" \
|
||||
@ -302,9 +302,9 @@ jobs:
|
||||
done
|
||||
|
||||
echo -e "\Export SharePoint test - last entry\n" >> ${CORSO_LOG_FILE}
|
||||
./corso backup list sharepoint 2>/dev/null | tail -n1 | awk '{print $1}' |
|
||||
./canario backup list sharepoint 2>/dev/null | tail -n1 | awk '{print $1}' |
|
||||
while read -r line; do
|
||||
./corso export sharepoint \
|
||||
./canario export sharepoint \
|
||||
"/tmp/corso-export--$line" \
|
||||
--no-stats \
|
||||
--backup "$line" \
|
||||
@ -323,7 +323,7 @@ jobs:
|
||||
# Run with the force flag so it doesn't fail if the github runner
|
||||
# hostname isn't what's expected. This is only safe because we can
|
||||
# guarantee only one runner will be executing maintenance at a time.
|
||||
./corso repo maintenance --mode metadata \
|
||||
./canario repo maintenance --mode metadata \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--force \
|
||||
@ -338,7 +338,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
echo -e "\n Maintenance test Weekly\n" >> ${CORSO_LOG_FILE}
|
||||
|
||||
./corso repo maintenance --mode complete \
|
||||
./canario repo maintenance --mode complete \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--force \
|
||||
@ -392,5 +392,5 @@ jobs:
|
||||
if: failure()
|
||||
uses: ./.github/actions/teams-message
|
||||
with:
|
||||
msg: "[CORSO FAILED] Longevity Test"
|
||||
msg: "[FAILED] Longevity Test"
|
||||
teams_url: ${{ secrets.TEAMS_CORSO_CI_WEBHOOK_URL }}
|
||||
|
||||
15
.github/workflows/nightly_test.yml
vendored
15
.github/workflows/nightly_test.yml
vendored
@ -3,8 +3,9 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
# Run every day at 04:00 GMT (roughly 8pm PST)
|
||||
- cron: "0 4 * * *"
|
||||
# Run every day at 06:00 GMT (roughly 10pm PST)
|
||||
# corso runs at 04:00 GMT, this is slightly offset to avoid conflicts.
|
||||
- cron: "0 6 * * *"
|
||||
|
||||
permissions:
|
||||
# required to retrieve AWS credentials
|
||||
@ -41,14 +42,14 @@ jobs:
|
||||
|
||||
# SetM365App will decide which M365 app to use for this CI run
|
||||
SetM365App:
|
||||
uses: alcionai/corso/.github/workflows/accSelector.yaml@main
|
||||
uses: alcionai/canario/.github/workflows/accSelector.yaml@main
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# --- Nightly Testing -------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
Test-Suite-Trusted:
|
||||
needs: [Checkout, SetM365App]
|
||||
needs: [ Checkout, SetM365App]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
@ -100,9 +101,9 @@ jobs:
|
||||
-timeout 2h \
|
||||
./... 2>&1 | tee ./testlog/gotest-nightly.log | gotestfmt -hide successful-tests
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Logging & Notifications
|
||||
# Logging & Notifications
|
||||
|
||||
# Upload the original go test output as an artifact for later review.
|
||||
- name: Upload test log
|
||||
@ -118,5 +119,5 @@ jobs:
|
||||
if: failure()
|
||||
uses: ./.github/actions/teams-message
|
||||
with:
|
||||
msg: "[COROS FAILED] Nightly Checks"
|
||||
msg: "[FAILED] Nightly Checks"
|
||||
teams_url: ${{ secrets.TEAMS_CORSO_CI_WEBHOOK_URL }}
|
||||
|
||||
102
.github/workflows/sanity-test.yaml
vendored
102
.github/workflows/sanity-test.yaml
vendored
@ -6,7 +6,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
user:
|
||||
description: "User to run sanity test on"
|
||||
description: 'User to run sanity test on'
|
||||
|
||||
permissions:
|
||||
# required to retrieve AWS credentials
|
||||
@ -20,10 +20,10 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
SetM365App:
|
||||
uses: alcionai/corso/.github/workflows/accSelector.yaml@main
|
||||
uses: alcionai/canario/.github/workflows/accSelector.yaml@main
|
||||
|
||||
Sanity-Tests:
|
||||
needs: [SetM365App]
|
||||
needs: [ SetM365App ]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
@ -44,10 +44,11 @@ jobs:
|
||||
run:
|
||||
working-directory: src
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# setup
|
||||
# setup
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Golang with cache
|
||||
@ -55,7 +56,7 @@ jobs:
|
||||
with:
|
||||
go-version-file: src/go.mod
|
||||
|
||||
- run: go build -o corso
|
||||
- run: go build -o canario
|
||||
timeout-minutes: 10
|
||||
|
||||
- run: go build -o sanity-test ./cmd/sanity_test
|
||||
@ -63,9 +64,9 @@ jobs:
|
||||
|
||||
- run: mkdir ${CORSO_LOG_DIR}
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Pre-Run cleanup
|
||||
# Pre-Run cleanup
|
||||
|
||||
# unlike CI tests, sanity tests are not expected to run concurrently.
|
||||
# however, the sanity yaml concurrency is set to a maximum of 1 run, preferring
|
||||
@ -90,9 +91,6 @@ jobs:
|
||||
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
||||
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
||||
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
||||
azure-pnp-client-id: ${{ secrets.AZURE_PNP_CLIENT_ID }}
|
||||
azure-pnp-client-cert: ${{ secrets.AZURE_PNP_CLIENT_CERT }}
|
||||
tenant-domain: ${{ vars.TENANT_DOMAIN }}
|
||||
|
||||
- name: Purge CI-Produced Folders for Sites
|
||||
timeout-minutes: 30
|
||||
@ -108,18 +106,15 @@ jobs:
|
||||
azure-tenant-id: ${{ secrets.TENANT_ID }}
|
||||
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
|
||||
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
|
||||
azure-pnp-client-id: ${{ secrets.AZURE_PNP_CLIENT_ID }}
|
||||
azure-pnp-client-cert: ${{ secrets.AZURE_PNP_CLIENT_CERT }}
|
||||
tenant-domain: ${{ vars.TENANT_DOMAIN }}
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Repository commands
|
||||
# Repository commands
|
||||
|
||||
- name: Version Test
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
./corso --version | grep -c 'Corso version:'
|
||||
./canario --version | grep -c 'Corso version:'
|
||||
|
||||
- name: Repo init test
|
||||
timeout-minutes: 10
|
||||
@ -128,7 +123,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
prefix=$(date +"%Y-%m-%d-%T")
|
||||
echo -e "\nRepo init test\n" >> ${{ env.CORSO_LOG_FILE }}
|
||||
./corso repo init s3 \
|
||||
./canario repo init s3 \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--prefix $prefix \
|
||||
@ -148,7 +143,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo -e "\nRepo connect test\n" >> ${{ env.CORSO_LOG_FILE }}
|
||||
./corso repo connect s3 \
|
||||
./canario repo connect s3 \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--prefix ${{ steps.repo-init.outputs.result }} \
|
||||
@ -168,15 +163,15 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo -e "\nRepo maintenance test\n" >> ${{ env.CORSO_LOG_FILE }}
|
||||
./corso repo maintenance \
|
||||
./canario repo maintenance \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--mode complete \
|
||||
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/gotest-repo-maintenance.log
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Exchange
|
||||
# Exchange
|
||||
|
||||
# generate new entries to roll into the next load test
|
||||
# only runs if the test was successful
|
||||
@ -198,8 +193,8 @@ jobs:
|
||||
service: exchange
|
||||
kind: first-backup
|
||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
||||
restore-args: "--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
|
||||
@ -211,8 +206,8 @@ jobs:
|
||||
service: exchange
|
||||
kind: incremental
|
||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
||||
restore-args: "--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
backup-id: ${{ steps.exchange-backup.outputs.backup-id }}
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
@ -225,8 +220,8 @@ jobs:
|
||||
service: exchange
|
||||
kind: non-delta
|
||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email" --disable-delta'
|
||||
restore-args: "--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
backup-id: ${{ steps.exchange-backup.outputs.backup-id }}
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
@ -239,15 +234,16 @@ jobs:
|
||||
service: exchange
|
||||
kind: non-delta-incremental
|
||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
||||
restore-args: "--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}"
|
||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||
backup-id: ${{ steps.exchange-backup.outputs.backup-id }}
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
|
||||
##########################################################################################################################################
|
||||
|
||||
# Onedrive
|
||||
##########################################################################################################################################
|
||||
|
||||
# Onedrive
|
||||
|
||||
# generate new entries for test
|
||||
- name: OneDrive - Create new data
|
||||
@ -274,8 +270,8 @@ jobs:
|
||||
service: onedrive
|
||||
kind: first-backup
|
||||
backup-args: '--user "${{ env.TEST_USER }}"'
|
||||
restore-args: "--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}"
|
||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
|
||||
@ -299,14 +295,14 @@ jobs:
|
||||
service: onedrive
|
||||
kind: incremental
|
||||
backup-args: '--user "${{ env.TEST_USER }}"'
|
||||
restore-args: "--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}"
|
||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Sharepoint Library
|
||||
# Sharepoint Library
|
||||
|
||||
# generate new entries for test
|
||||
- name: SharePoint - Create new data
|
||||
@ -334,8 +330,8 @@ jobs:
|
||||
service: sharepoint
|
||||
kind: first-backup
|
||||
backup-args: '--site "${{ vars.CORSO_M365_TEST_SITE_URL }}" --data libraries'
|
||||
restore-args: "--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}"
|
||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
category: libraries
|
||||
@ -361,15 +357,15 @@ jobs:
|
||||
service: sharepoint
|
||||
kind: incremental
|
||||
backup-args: '--site "${{ vars.CORSO_M365_TEST_SITE_URL }}" --data libraries'
|
||||
restore-args: "--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}"
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}"
|
||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
category: libraries
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Sharepoint Lists
|
||||
# Sharepoint Lists
|
||||
|
||||
# generate new entries for test
|
||||
# The `awk | tr | sed` command chain is used to get a comma separated list of SharePoint list names.
|
||||
@ -458,9 +454,9 @@ jobs:
|
||||
category: lists
|
||||
on-collision: copy
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Groups and Teams
|
||||
# Groups and Teams
|
||||
|
||||
# generate new entries for test
|
||||
- name: Groups - Create new data
|
||||
@ -487,8 +483,8 @@ jobs:
|
||||
with:
|
||||
service: groups
|
||||
kind: first-backup
|
||||
backup-args: '--group "${{ vars.CORSO_M365_TEST_TEAM_ID }}" --data messages,libraries'
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}"
|
||||
backup-args: '--group "${{ vars.CORSO_M365_TEST_TEAM_ID }}"'
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
|
||||
@ -512,15 +508,15 @@ jobs:
|
||||
with:
|
||||
service: groups
|
||||
kind: incremental
|
||||
backup-args: '--group "${{ vars.CORSO_M365_TEST_TEAM_ID }}" --data messages,libraries'
|
||||
backup-args: '--group "${{ vars.CORSO_M365_TEST_TEAM_ID }}"'
|
||||
restore-args: '--site "${{ vars.CORSO_M365_TEST_GROUPS_SITE_URL }}" --folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}'
|
||||
restore-container: "${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}"
|
||||
restore-container: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-groups.outputs.result }}'
|
||||
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||
with-export: true
|
||||
|
||||
##########################################################################################################################################
|
||||
##########################################################################################################################################
|
||||
|
||||
# Logging & Notifications
|
||||
# Logging & Notifications
|
||||
|
||||
# Upload the original go test output as an artifact for later review.
|
||||
- name: Upload test log
|
||||
@ -536,5 +532,5 @@ jobs:
|
||||
if: failure()
|
||||
uses: ./.github/actions/teams-message
|
||||
with:
|
||||
msg: "[CORSO FAILED] Sanity Tests"
|
||||
msg: "[FAILED] Sanity Tests"
|
||||
teams_url: ${{ secrets.TEAMS_CORSO_CI_WEBHOOK_URL }}
|
||||
|
||||
10
.github/workflows/website-publish.yml
vendored
10
.github/workflows/website-publish.yml
vendored
@ -1,6 +1,10 @@
|
||||
name: Publish website
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# workflow_dispatch:
|
||||
# turned off for now, since canario should not publish the website
|
||||
push:
|
||||
branches:
|
||||
does-not-exist-this-forces-the-action-to-not-run
|
||||
|
||||
permissions:
|
||||
# required to retrieve AWS credentials
|
||||
@ -49,6 +53,8 @@ jobs:
|
||||
|
||||
Publish-Website:
|
||||
needs: [Website-Linting]
|
||||
# canario should never publish
|
||||
if: false
|
||||
environment: Production
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
@ -59,6 +65,8 @@ jobs:
|
||||
- uses: actions/checkout@v4 # need to checkout to make the action available
|
||||
|
||||
- name: Publish website
|
||||
# canario should never publish
|
||||
if: false
|
||||
uses: ./.github/actions/publish-website
|
||||
with:
|
||||
aws-iam-role: ${{ secrets.AWS_IAM_ROLE }}
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -19,8 +19,8 @@ testlog/
|
||||
*.swp
|
||||
|
||||
# Standard configuration file names
|
||||
.corso_test.toml
|
||||
.corso.toml
|
||||
.canario_test.toml
|
||||
.canario.toml
|
||||
|
||||
# Logging
|
||||
*.log
|
||||
|
||||
@ -9,9 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Fixed
|
||||
- Handle the case where an email or event cannot be retrieved from Exchange due to an `ErrorCorruptData` error. Corso will skip over the item but report it in the backup summary.
|
||||
- Emails attached within other emails are now correctly exported
|
||||
- Gracefully handle email and post attachments without name when exporting to eml
|
||||
- Use correct timezone for event start and end times in Exchange exports (helps fix issues in relative recurrence patterns)
|
||||
- Fixed an issue causing exports dealing with calendar data to have high memory usage
|
||||
- Gracefully handle email and post attachments without name when exporting to eml
|
||||
|
||||
## [v0.19.0] (beta) - 2024-02-06
|
||||
|
||||
|
||||
177
LICENSE
177
LICENSE
@ -1,177 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@ -1,10 +1,7 @@
|
||||
> [!NOTE]
|
||||
> **The Corso project is no longer actively maintained and has been archived**.
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/alcionai/corso/blob/main/website/static/img/corso_logo.svg?raw=true" alt="Corso Logo" width="100" />
|
||||
</p>
|
||||
<h1 align="center">Corso</h1>
|
||||
<h1 align="center">--CANARIO--</h1>
|
||||
|
||||
[](https://goreportcard.com/report/github.com/alcionai/corso/src)
|
||||
[](https://discord.gg/63DTTSnuhT)
|
||||
|
||||
@ -4,21 +4,21 @@ WORKDIR /go/src/app
|
||||
COPY src .
|
||||
|
||||
ARG CORSO_BUILD_LDFLAGS=""
|
||||
RUN go build -o corso -ldflags "$CORSO_BUILD_LDFLAGS"
|
||||
RUN go build -o canario -ldflags "$CORSO_BUILD_LDFLAGS"
|
||||
|
||||
FROM alpine:3
|
||||
|
||||
LABEL org.opencontainers.image.title="Corso"
|
||||
LABEL org.opencontainers.image.title="Canario"
|
||||
LABEL org.opencontainers.image.description="Free, Secure, and Open-Source Backup for Microsoft 365"
|
||||
LABEL org.opencontainers.image.url="https://github.com/alcionai/corso"
|
||||
LABEL org.opencontainers.image.source="https://github.com/alcionai/corso"
|
||||
LABEL org.opencontainers.image.url="https://github.com/alcionai/canario"
|
||||
LABEL org.opencontainers.image.source="https://github.com/alcionai/canario"
|
||||
LABEL org.opencontainers.image.vendor="Alcion, Inc."
|
||||
|
||||
COPY --from=builder /go/src/app/corso /corso
|
||||
COPY --from=builder /go/src/app/canario /canario
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
ENV CORSO_HOME=/app/corso
|
||||
ENV CORSO_HOME=/app/canario
|
||||
ENV CORSO_CONFIG_DIR=$CORSO_HOME \
|
||||
KOPIA_CONFIG_PATH=$CORSO_HOME/kopia/config/repository.config \
|
||||
KOPIA_LOG_DIR=$CORSO_HOME/kopia/logs \
|
||||
@ -26,4 +26,4 @@ ENV CORSO_CONFIG_DIR=$CORSO_HOME \
|
||||
KOPIA_PERSIST_CREDENTIALS_ON_CONNECT=false \
|
||||
KOPIA_CHECK_FOR_UPDATES=false
|
||||
|
||||
ENTRYPOINT ["/corso"]
|
||||
ENTRYPOINT ["/canario"]
|
||||
@ -30,7 +30,7 @@ Darwin) GOOS="darwin" ;;
|
||||
esac
|
||||
|
||||
PLATFORMS="$GOOS/$GOARCH" # default platform
|
||||
TAG="alcionai/corso" # default image tag
|
||||
TAG="alcionai/canario" # default image tag
|
||||
|
||||
MODE="binary"
|
||||
case "$1" in
|
||||
@ -68,13 +68,13 @@ if [ "$MODE" == "binary" ]; then
|
||||
--env GOOS=${GOOS} --env GOARCH=${GOARCH} \
|
||||
--workdir "/app/src" \
|
||||
golang:${GOVER} \
|
||||
go build -o corso -ldflags "${CORSO_BUILD_LDFLAGS}"
|
||||
go build -o canario -ldflags "${CORSO_BUILD_LDFLAGS}"
|
||||
|
||||
OUTFILE="corso"
|
||||
[ "$GOOS" == "windows" ] && OUTFILE="corso.exe"
|
||||
OUTFILE="canario"
|
||||
[ "$GOOS" == "windows" ] && OUTFILE="canario.exe"
|
||||
|
||||
mkdir -p "${ROOT}/bin/${GOOS}-${GOARCH}"
|
||||
mv "${ROOT}/src/corso" "${ROOT}/bin/${GOOS}-${GOARCH}/${OUTFILE}"
|
||||
mv "${ROOT}/src/canario" "${ROOT}/bin/${GOOS}-${GOARCH}/${OUTFILE}"
|
||||
echo Corso $platform binary available in "${ROOT}/bin/${GOOS}-${GOARCH}/${OUTFILE}"
|
||||
done
|
||||
else
|
||||
|
||||
@ -17,13 +17,13 @@ COPY ./src .
|
||||
FROM base AS build
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /corso .
|
||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /canario .
|
||||
|
||||
## Deploy
|
||||
FROM ubuntu:22.10
|
||||
|
||||
COPY --from=build /corso /
|
||||
COPY --from=build /canario /
|
||||
|
||||
USER nobody
|
||||
|
||||
ENTRYPOINT ["/corso"]
|
||||
ENTRYPOINT ["/canario"]
|
||||
|
||||
6
src/.gitignore
vendored
6
src/.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
dist/
|
||||
corso
|
||||
canario
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
@ -14,8 +14,8 @@ testlog/
|
||||
*.swp
|
||||
|
||||
# Standard configuration file names
|
||||
.corso_test.toml
|
||||
.corso.toml
|
||||
.canario_test.toml
|
||||
.canario.toml
|
||||
|
||||
# Logging
|
||||
*.log
|
||||
|
||||
@ -35,7 +35,7 @@ linters-settings:
|
||||
sections:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/alcionai/corso)
|
||||
- prefix(github.com/alcionai/canario)
|
||||
skip-generated: true
|
||||
forbidigo:
|
||||
forbid:
|
||||
|
||||
@ -13,9 +13,9 @@ builds:
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
ldflags:
|
||||
- -X 'github.com/alcionai/corso/src/internal/version.Version={{.Env.CORSO_VERSION}}'
|
||||
- -X 'github.com/alcionai/corso/src/internal/events.RudderStackWriteKey={{.Env.RUDDERSTACK_CORSO_WRITE_KEY}}'
|
||||
- -X 'github.com/alcionai/corso/src/internal/events.RudderStackDataPlaneURL={{.Env.RUDDERSTACK_CORSO_DATA_PLANE_URL}}'
|
||||
- -X 'github.com/alcionai/canario/src/internal/version.Version={{.Env.CORSO_VERSION}}'
|
||||
- -X 'github.com/alcionai/canario/src/internal/events.RudderStackWriteKey={{.Env.RUDDERSTACK_CORSO_WRITE_KEY}}'
|
||||
- -X 'github.com/alcionai/canario/src/internal/events.RudderStackDataPlaneURL={{.Env.RUDDERSTACK_CORSO_DATA_PLANE_URL}}'
|
||||
|
||||
archives:
|
||||
# this name template makes the OS and Arch compatible with the results of uname.
|
||||
|
||||
@ -9,7 +9,7 @@ BAD_LINT_MSG := "Missing golangci-lint version $(WANTED_LINT_VERSION). Visit $(I
|
||||
.PHONY: check-lint check-lint-version lint load-test
|
||||
|
||||
build:
|
||||
go build -o corso
|
||||
go build -o canario
|
||||
|
||||
lint: check-lint-version
|
||||
golangci-lint run
|
||||
@ -18,7 +18,7 @@ lint: check-lint-version
|
||||
fmt:
|
||||
gofumpt -w .
|
||||
goimports -w .
|
||||
gci write --skip-generated -s 'standard' -s 'default' -s 'prefix(github.com/alcionai/corso)' .
|
||||
gci write --skip-generated -s 'standard' -s 'default' -s 'prefix(github.com/alcionai/canario)' .
|
||||
|
||||
check-lint-version: check-lint
|
||||
@if [ "$(LINT_VERSION)" != "$(WANTED_LINT_VERSION)" ]; then \
|
||||
|
||||
@ -9,22 +9,22 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/common/color"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/data"
|
||||
"github.com/alcionai/corso/src/internal/observe"
|
||||
"github.com/alcionai/corso/src/pkg/backup"
|
||||
"github.com/alcionai/corso/src/pkg/backup/details"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/errs/core"
|
||||
"github.com/alcionai/corso/src/pkg/logger"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/store"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/common/color"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/data"
|
||||
"github.com/alcionai/canario/src/internal/observe"
|
||||
"github.com/alcionai/canario/src/pkg/backup"
|
||||
"github.com/alcionai/canario/src/pkg/backup/details"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/errs/core"
|
||||
"github.com/alcionai/canario/src/pkg/logger"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/store"
|
||||
)
|
||||
|
||||
var ErrEmptyBackup = clues.New("no items in backup")
|
||||
|
||||
@ -8,13 +8,13 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/utils/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/backup/details"
|
||||
dtd "github.com/alcionai/corso/src/pkg/backup/details/testdata"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/utils/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/backup/details"
|
||||
dtd "github.com/alcionai/canario/src/pkg/backup/details/testdata"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
type BackupUnitSuite struct {
|
||||
|
||||
@ -4,12 +4,12 @@ import (
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/fault"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -11,20 +11,20 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/its"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/services/m365/api"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/its"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/services/m365/api"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -150,11 +150,8 @@ func runExchangeBackupCategoryTest(suite *BackupExchangeE2ESuite, category path.
|
||||
result := recorder.String()
|
||||
t.Log("backup results", result)
|
||||
|
||||
// As an offhand check: the result should contain the m365 user's email.
|
||||
assert.Contains(
|
||||
t,
|
||||
strings.ToLower(result),
|
||||
strings.ToLower(suite.m365.User.Provider.Name()))
|
||||
// as an offhand check: the result should contain the m365 user id
|
||||
assert.Contains(t, result, suite.m365.User.ID)
|
||||
}
|
||||
|
||||
func (suite *BackupExchangeE2ESuite) TestExchangeBackupCmd_ServiceNotEnabled_email() {
|
||||
@ -186,11 +183,8 @@ func runExchangeBackupServiceNotEnabledTest(suite *BackupExchangeE2ESuite, categ
|
||||
result := recorder.String()
|
||||
t.Log("backup results", result)
|
||||
|
||||
// As an offhand check: the result should contain the m365 user's email.
|
||||
assert.Contains(
|
||||
t,
|
||||
strings.ToLower(result),
|
||||
strings.ToLower(suite.m365.User.Provider.Name()))
|
||||
// as an offhand check: the result should contain the m365 user id
|
||||
assert.Contains(t, result, suite.m365.User.ID)
|
||||
}
|
||||
|
||||
func (suite *BackupExchangeE2ESuite) TestExchangeBackupCmd_userNotFound_email() {
|
||||
@ -288,11 +282,8 @@ func (suite *BackupExchangeE2ESuite) TestBackupCreateExchange_fromConfigFile() {
|
||||
result := suite.dpnd.recorder.String()
|
||||
t.Log("backup results", result)
|
||||
|
||||
// As an offhand check: the result should contain the m365 user's email.
|
||||
assert.Contains(
|
||||
t,
|
||||
strings.ToLower(result),
|
||||
strings.ToLower(suite.m365.User.Provider.Name()))
|
||||
// as an offhand check: the result should contain the m365 user id
|
||||
assert.Contains(t, result, suite.m365.User.ID)
|
||||
}
|
||||
|
||||
// AWS flags
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
type ExchangeUnitSuite struct {
|
||||
|
||||
@ -8,15 +8,15 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/filters"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/services/m365"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/pkg/fault"
|
||||
"github.com/alcionai/canario/src/pkg/filters"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/services/m365"
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -13,20 +13,20 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/its"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
selTD "github.com/alcionai/corso/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/its"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
selTD "github.com/alcionai/canario/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@ -114,8 +114,6 @@ func (suite *BackupGroupsE2ESuite) TestGroupsBackupCmd_channelMessages() {
|
||||
}
|
||||
|
||||
func (suite *BackupGroupsE2ESuite) TestGroupsBackupCmd_conversations() {
|
||||
// skip
|
||||
suite.T().Skip("CorsoCITeam group mailbox backup is broken")
|
||||
runGroupsBackupCategoryTest(suite, flags.DataConversations)
|
||||
}
|
||||
|
||||
@ -219,9 +217,6 @@ func (suite *BackupGroupsE2ESuite) TestBackupCreateGroups_badAzureClientIDFlag()
|
||||
}
|
||||
|
||||
func (suite *BackupGroupsE2ESuite) TestBackupCreateGroups_fromConfigFile() {
|
||||
// Skip
|
||||
suite.T().Skip("CorsoCITeam group mailbox backup is broken")
|
||||
|
||||
t := suite.T()
|
||||
ctx, flush := tester.NewContext(t)
|
||||
ctx = config.SetViper(ctx, suite.dpnd.vpr)
|
||||
@ -305,10 +300,7 @@ func (suite *PreparedBackupGroupsE2ESuite) SetupSuite() {
|
||||
ins = idname.NewCache(map[string]string{suite.m365.Group.ID: suite.m365.Group.ID})
|
||||
cats = []path.CategoryType{
|
||||
path.ChannelMessagesCategory,
|
||||
// TODO(pandeyabs): CorsoCITeam group mailbox backup is currently broken because of invalid
|
||||
// odata.NextLink which causes an infinite loop during paging. Disabling conversations tests while
|
||||
// we go fix the group mailbox.
|
||||
// path.ConversationPostsCategory,
|
||||
path.ConversationPostsCategory,
|
||||
path.LibrariesCategory,
|
||||
}
|
||||
)
|
||||
@ -462,8 +454,6 @@ func (suite *PreparedBackupGroupsE2ESuite) TestGroupsDetailsCmd_channelMessages(
|
||||
}
|
||||
|
||||
func (suite *PreparedBackupGroupsE2ESuite) TestGroupsDetailsCmd_conversations() {
|
||||
// skip
|
||||
suite.T().Skip("CorsoCITeam group mailbox backup is broken")
|
||||
runGroupsDetailsCmdTest(suite, path.ConversationPostsCategory)
|
||||
}
|
||||
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
type GroupsUnitSuite struct {
|
||||
|
||||
@ -10,18 +10,18 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/account"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
"github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/account"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
"github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
type dependencies struct {
|
||||
|
||||
@ -5,12 +5,12 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/fault"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -11,19 +11,19 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
selTD "github.com/alcionai/corso/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
selTD "github.com/alcionai/canario/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@ -9,12 +9,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
type OneDriveUnitSuite struct {
|
||||
|
||||
@ -7,15 +7,15 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/filters"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/services/m365"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/pkg/fault"
|
||||
"github.com/alcionai/canario/src/pkg/filters"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/services/m365"
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -13,21 +13,21 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/its"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/backup/details"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/its"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/backup/details"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@ -110,7 +110,7 @@ func (suite *BackupSharepointE2ESuite) SetupSuite() {
|
||||
}
|
||||
|
||||
func (suite *BackupSharepointE2ESuite) TestSharepointBackupCmd_lists() {
|
||||
// Issue: https://github.com/alcionai/corso/issues/4754
|
||||
// Issue: https://github.com/alcionai/canario/issues/4754
|
||||
suite.T().Skip("unskip when sharepoint lists support is enabled")
|
||||
runSharepointBackupCategoryTest(suite, flags.DataLists)
|
||||
}
|
||||
@ -142,7 +142,7 @@ func runSharepointBackupCategoryTest(suite *BackupSharepointE2ESuite, category s
|
||||
}
|
||||
|
||||
func (suite *BackupSharepointE2ESuite) TestSharepointBackupCmd_siteNotFound_lists() {
|
||||
// Issue: https://github.com/alcionai/corso/issues/4754
|
||||
// Issue: https://github.com/alcionai/canario/issues/4754
|
||||
suite.T().Skip("un-skip test when lists support is enabled")
|
||||
runSharepointBackupSiteNotFoundTest(suite, flags.DataLists)
|
||||
}
|
||||
|
||||
@ -10,14 +10,14 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
type SharePointUnitSuite struct {
|
||||
|
||||
@ -8,15 +8,15 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/filters"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/services/m365"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/pkg/fault"
|
||||
"github.com/alcionai/canario/src/pkg/filters"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/services/m365"
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -13,20 +13,20 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/its"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
selTD "github.com/alcionai/corso/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/its"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
selTD "github.com/alcionai/canario/src/pkg/selectors/testdata"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@ -9,12 +9,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
type TeamsChatsUnitSuite struct {
|
||||
|
||||
@ -9,18 +9,18 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/backup"
|
||||
"github.com/alcionai/corso/src/cli/debug"
|
||||
"github.com/alcionai/corso/src/cli/export"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/help"
|
||||
"github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/repo"
|
||||
"github.com/alcionai/corso/src/cli/restore"
|
||||
"github.com/alcionai/corso/src/internal/observe"
|
||||
"github.com/alcionai/corso/src/internal/version"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/logger"
|
||||
"github.com/alcionai/canario/src/cli/backup"
|
||||
"github.com/alcionai/canario/src/cli/debug"
|
||||
"github.com/alcionai/canario/src/cli/export"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/help"
|
||||
"github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/repo"
|
||||
"github.com/alcionai/canario/src/cli/restore"
|
||||
"github.com/alcionai/canario/src/internal/observe"
|
||||
"github.com/alcionai/canario/src/internal/version"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/logger"
|
||||
)
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
@ -28,9 +28,9 @@ import (
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
// The root-level command.
|
||||
// `corso <command> [<subcommand>] [<service>] [<flag>...]`
|
||||
var corsoCmd = &cobra.Command{
|
||||
Use: "corso",
|
||||
// `canario <command> [<subcommand>] [<service>] [<flag>...]`
|
||||
var canarioCmd = &cobra.Command{
|
||||
Use: "canario",
|
||||
Short: "Free, Secure, Open-Source Backup for M365.",
|
||||
Long: `Free, Secure, and Open-Source Backup for Microsoft 365.`,
|
||||
RunE: handleCorsoCmd,
|
||||
@ -54,7 +54,7 @@ func preRun(cc *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
avoidTheseCommands := []string{
|
||||
"corso", "env", "help", "backup", "details", "list", "restore", "export", "delete", "repo", "init", "connect",
|
||||
"canario", "env", "help", "backup", "details", "list", "restore", "export", "delete", "repo", "init", "connect",
|
||||
}
|
||||
|
||||
if len(logger.ResolvedLogFile) > 0 && !slices.Contains(avoidTheseCommands, cc.Use) {
|
||||
@ -62,7 +62,7 @@ func preRun(cc *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
// handle deprecated user flag in Backup exchange command
|
||||
if cc.CommandPath() == "corso backup create exchange" {
|
||||
if cc.CommandPath() == "canario backup create exchange" {
|
||||
handleMailBoxFlag(ctx, cc, flagSl)
|
||||
}
|
||||
|
||||
@ -83,8 +83,8 @@ func handleMailBoxFlag(ctx context.Context, c *cobra.Command, flagNames []string
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for flat calls to `corso`.
|
||||
// Produces the same output as `corso --help`.
|
||||
// Handler for flat calls to `canario`.
|
||||
// Produces the same output as `canario --help`.
|
||||
func handleCorsoCmd(cmd *cobra.Command, args []string) error {
|
||||
v, _ := cmd.Flags().GetBool("version")
|
||||
if v {
|
||||
@ -99,7 +99,7 @@ func handleCorsoCmd(cmd *cobra.Command, args []string) error {
|
||||
// The command tree is built and attached to the returned command.
|
||||
func CorsoCommand() *cobra.Command {
|
||||
c := &cobra.Command{}
|
||||
*c = *corsoCmd
|
||||
*c = *canarioCmd
|
||||
BuildCommandTree(c)
|
||||
|
||||
return c
|
||||
@ -118,7 +118,7 @@ func BuildCommandTree(cmd *cobra.Command) {
|
||||
observe.AddProgressBarFlags(cmd)
|
||||
print.AddOutputFlag(cmd)
|
||||
flags.AddGlobalOperationFlags(cmd)
|
||||
cmd.SetUsageTemplate(indentExamplesTemplate(corsoCmd.UsageTemplate()))
|
||||
cmd.SetUsageTemplate(indentExamplesTemplate(canarioCmd.UsageTemplate()))
|
||||
|
||||
cmd.CompletionOptions.DisableDefaultCmd = true
|
||||
|
||||
@ -139,10 +139,10 @@ func Handle() {
|
||||
//nolint:forbidigo
|
||||
ctx := config.Seed(context.Background())
|
||||
ctx, log := logger.Seed(ctx, logger.PreloadLoggingFlags(os.Args[1:]))
|
||||
ctx = print.SetRootCmd(ctx, corsoCmd)
|
||||
ctx = print.SetRootCmd(ctx, canarioCmd)
|
||||
ctx = observe.SeedObserver(ctx, print.StderrWriter(ctx), observe.PreloadFlags())
|
||||
|
||||
BuildCommandTree(corsoCmd)
|
||||
BuildCommandTree(canarioCmd)
|
||||
|
||||
defer func() {
|
||||
observe.Flush(ctx) // flush the progress bars
|
||||
@ -150,7 +150,7 @@ func Handle() {
|
||||
_ = log.Sync() // flush all logs in the buffer
|
||||
}()
|
||||
|
||||
if err := corsoCmd.ExecuteContext(ctx); err != nil {
|
||||
if err := canarioCmd.ExecuteContext(ctx); err != nil {
|
||||
logger.CtxErr(ctx, err).Error("cli execution")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type CLIUnitSuite struct {
|
||||
|
||||
@ -6,11 +6,11 @@ import (
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/fault"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/fault"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
var subCommandFuncs = []func() *cobra.Command{
|
||||
|
||||
@ -3,9 +3,9 @@ package debug
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// called by debug.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type ExchangeUnitSuite struct {
|
||||
|
||||
@ -3,9 +3,9 @@ package debug
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// called by debug.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type GroupsUnitSuite struct {
|
||||
|
||||
@ -3,9 +3,9 @@ package debug
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// called by debug.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type OneDriveUnitSuite struct {
|
||||
|
||||
@ -3,9 +3,9 @@ package debug
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// called by debug.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,10 +7,10 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type SharePointUnitSuite struct {
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
)
|
||||
|
||||
// called by export.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type ExchangeUnitSuite struct {
|
||||
|
||||
@ -8,16 +8,16 @@ import (
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/data"
|
||||
"github.com/alcionai/corso/src/internal/observe"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/dttm"
|
||||
"github.com/alcionai/corso/src/pkg/export"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/data"
|
||||
"github.com/alcionai/canario/src/internal/observe"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/dttm"
|
||||
"github.com/alcionai/canario/src/pkg/export"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
var exportCommands = []func(cmd *cobra.Command) *cobra.Command{
|
||||
|
||||
@ -4,9 +4,9 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
// called by export.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type GroupsUnitSuite struct {
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
)
|
||||
|
||||
// called by export.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type OneDriveUnitSuite struct {
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
)
|
||||
|
||||
// called by export.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type SharePointUnitSuite struct {
|
||||
|
||||
@ -3,7 +3,7 @@ package flags
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
)
|
||||
|
||||
// filesystem flag names
|
||||
|
||||
@ -3,7 +3,7 @@ package flags
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/pkg/control/repository"
|
||||
"github.com/alcionai/canario/src/pkg/control/repository"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -3,7 +3,7 @@ package flags
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/pkg/control/repository"
|
||||
"github.com/alcionai/canario/src/pkg/control/repository"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/pkg/credentials"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
"github.com/alcionai/canario/src/pkg/credentials"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
)
|
||||
|
||||
// S3 bucket flags
|
||||
|
||||
2
src/cli/flags/testdata/backup_list.go
vendored
2
src/cli/flags/testdata/backup_list.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
)
|
||||
|
||||
func PreparedBackupListFlags() []string {
|
||||
|
||||
2
src/cli/flags/testdata/groups.go
vendored
2
src/cli/flags/testdata/groups.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
)
|
||||
|
||||
func PreparedChannelFlags() []string {
|
||||
|
||||
2
src/cli/flags/testdata/repo.go
vendored
2
src/cli/flags/testdata/repo.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
)
|
||||
|
||||
func PreparedStorageFlags() []string {
|
||||
|
||||
2
src/cli/flags/testdata/sharepoint.go
vendored
2
src/cli/flags/testdata/sharepoint.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
)
|
||||
|
||||
func PreparedLibraryFlags() []string {
|
||||
|
||||
@ -3,7 +3,7 @@ package help
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
)
|
||||
|
||||
// AddCommands attaches all `corso env * *` commands to the parent.
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type EnvSuite struct {
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"github.com/tidwall/pretty"
|
||||
"github.com/tomlazar/table"
|
||||
|
||||
"github.com/alcionai/corso/src/internal/common/color"
|
||||
"github.com/alcionai/corso/src/internal/observe"
|
||||
"github.com/alcionai/canario/src/internal/common/color"
|
||||
"github.com/alcionai/canario/src/internal/observe"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type PrintUnitSuite struct {
|
||||
|
||||
@ -4,14 +4,14 @@ import (
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/events"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
ctrlRepo "github.com/alcionai/corso/src/pkg/control/repository"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/events"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
ctrlRepo "github.com/alcionai/canario/src/pkg/control/repository"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -8,17 +8,17 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/account"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/account"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
type FilesystemE2ESuite struct {
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type FilesystemSuite struct {
|
||||
|
||||
@ -7,13 +7,13 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/events"
|
||||
"github.com/alcionai/corso/src/pkg/control/repository"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
repo "github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/events"
|
||||
"github.com/alcionai/canario/src/pkg/control/repository"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
repo "github.com/alcionai/canario/src/pkg/repository"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -9,15 +9,15 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/repo"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/repo"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
type RepoUnitSuite struct {
|
||||
|
||||
@ -6,13 +6,13 @@ import (
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/events"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/events"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
)
|
||||
|
||||
// called by repo.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -10,18 +10,18 @@ import (
|
||||
"github.com/stretchr/testify/suite"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/str"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/account"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/str"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/account"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
type S3E2ESuite struct {
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type S3Suite struct {
|
||||
|
||||
@ -3,8 +3,8 @@ package restore
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
)
|
||||
|
||||
// called by restore.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -10,22 +10,22 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli"
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/internal/common/idname"
|
||||
"github.com/alcionai/corso/src/internal/operations"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/pkg/account"
|
||||
"github.com/alcionai/corso/src/pkg/config"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/repository"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/corso/src/pkg/services/m365/api"
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/corso/src/pkg/storage/testdata"
|
||||
"github.com/alcionai/canario/src/cli"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/internal/common/idname"
|
||||
"github.com/alcionai/canario/src/internal/operations"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/canario/src/pkg/account"
|
||||
"github.com/alcionai/canario/src/pkg/config"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/path"
|
||||
"github.com/alcionai/canario/src/pkg/repository"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/pkg/services/m365/api"
|
||||
"github.com/alcionai/canario/src/pkg/storage"
|
||||
storeTD "github.com/alcionai/canario/src/pkg/storage/testdata"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type ExchangeUnitSuite struct {
|
||||
|
||||
@ -3,10 +3,10 @@ package restore
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/dttm"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/dttm"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
// called by restore.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type GroupsUnitSuite struct {
|
||||
|
||||
@ -3,9 +3,9 @@ package restore
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/dttm"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/dttm"
|
||||
)
|
||||
|
||||
// called by restore.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type OneDriveUnitSuite struct {
|
||||
|
||||
@ -7,12 +7,12 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
. "github.com/alcionai/corso/src/cli/print"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/data"
|
||||
"github.com/alcionai/corso/src/pkg/count"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
. "github.com/alcionai/canario/src/cli/print"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/data"
|
||||
"github.com/alcionai/canario/src/pkg/count"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
var restoreCommands = []func(cmd *cobra.Command) *cobra.Command{
|
||||
|
||||
@ -3,9 +3,9 @@ package restore
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/pkg/dttm"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/pkg/dttm"
|
||||
)
|
||||
|
||||
// called by restore.go to map subcommands to provider-specific handling.
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/corso/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/corso/src/cli/testdata"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
flagsTD "github.com/alcionai/canario/src/cli/flags/testdata"
|
||||
cliTD "github.com/alcionai/canario/src/cli/testdata"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
type SharePointUnitSuite struct {
|
||||
|
||||
6
src/cli/testdata/cli.go
vendored
6
src/cli/testdata/cli.go
vendored
@ -13,8 +13,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
)
|
||||
|
||||
// StubRootCmd builds a stub cobra command to be used as
|
||||
@ -22,7 +22,7 @@ import (
|
||||
func StubRootCmd(args ...string) *cobra.Command {
|
||||
id := uuid.NewString()
|
||||
now := time.Now().UTC().Format(time.RFC3339Nano)
|
||||
cmdArg := "testing-corso"
|
||||
cmdArg := "testing-canario"
|
||||
c := &cobra.Command{
|
||||
Use: cmdArg,
|
||||
Short: id,
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
type ExchangeOpts struct {
|
||||
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/cli/utils"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/dttm"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/cli/utils"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/dttm"
|
||||
"github.com/alcionai/canario/src/pkg/selectors"
|
||||
)
|
||||
|
||||
type ExchangeUtilsSuite struct {
|
||||
|
||||
@ -7,9 +7,9 @@ import (
|
||||
"github.com/alcionai/clues"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/filters"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/pkg/filters"
|
||||
)
|
||||
|
||||
type ExportCfgOpts struct {
|
||||
|
||||
@ -7,9 +7,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"github.com/alcionai/corso/src/cli/flags"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/canario/src/cli/flags"
|
||||
"github.com/alcionai/canario/src/internal/tester"
|
||||
"github.com/alcionai/canario/src/pkg/control"
|
||||
)
|
||||
|
||||
type ExportCfgUnitSuite struct {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user