-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #392 from atlanhq/DVX-147
Adds option to export only glossaries in asset export basic package
- Loading branch information
Showing
5 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
samples/packages/asset-export-basic/src/test/kotlin/OnlyGlossariesTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 | ||
Copyright 2023 Atlan Pte. Ltd. */ | ||
import com.atlan.pkg.PackageTest | ||
import org.testng.ITestContext | ||
import org.testng.annotations.AfterClass | ||
import org.testng.annotations.BeforeClass | ||
import kotlin.test.Test | ||
|
||
/** | ||
* Test export of only glossaries, no assets. | ||
*/ | ||
class OnlyGlossariesTest : PackageTest() { | ||
|
||
private val files = listOf( | ||
"glossary-export.csv", | ||
"debug.log", | ||
"asset-export.csv", | ||
) | ||
|
||
@BeforeClass | ||
fun beforeClass() { | ||
setup( | ||
AssetExportBasicCfg( | ||
exportScope = "GLOSSARIES_ONLY", | ||
qnPrefix = "", | ||
includeGlossaries = false, | ||
), | ||
) | ||
Exporter.main(arrayOf(testDirectory)) | ||
} | ||
|
||
@Test | ||
fun filesCreated() { | ||
validateFilesExist(files.subList(0, files.size - 1)) | ||
validateFileExistsButEmpty(files.subList(2, files.size)) | ||
} | ||
|
||
@Test | ||
fun errorFreeLog() { | ||
validateErrorFreeLog() | ||
} | ||
|
||
@AfterClass(alwaysRun = true) | ||
fun afterClass(context: ITestContext) { | ||
teardown(context.failedTests.size() > 0) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters