Skip to content
Snippets Groups Projects
Commit 92e06a5c authored by MORIN Edouard's avatar MORIN Edouard
Browse files

fix: correction snap pour test-8

parent 05a781ff
No related branches found
No related tags found
1 merge request!12Mise en place test + #31
Pipeline #527566 passed
......@@ -14,11 +14,11 @@
user = "test", server = Sys.getenv("server"))
Output
nom_schema nom_table nom_col commentaire
1 public test_iris sepal_width libellé de Sepal.Width cc
2 public test_iris petal_length libellé de Petal.Length cc
3 public test_iris species Commentlibaba !
1 public test_iris sepal_length libellé de Sepal.Length cc
2 public test_iris sepal_width libellé de Sepal.Width cc
3 public test_iris petal_length libellé de Petal.Length cc
4 public test_iris petal_width libellé de Petal.Width cc
5 public test_iris sepal_length libellé de Sepal.Length cc
5 public test_iris species Commentlibaba !
# get_table_comments works
......@@ -28,25 +28,9 @@
Output
nom_schema nom_table commentaire nom_col
1 public test_iris NA <NA>
2 public test_iris libellé de Sepal.Width cc sepal_width
3 public test_iris libellé de Petal.Length cc petal_length
4 public test_iris Commentlibaba ! species
2 public test_iris libellé de Sepal.Length cc sepal_length
3 public test_iris libellé de Sepal.Width cc sepal_width
4 public test_iris libellé de Petal.Length cc petal_length
5 public test_iris libellé de Petal.Width cc petal_width
6 public test_iris libellé de Sepal.Length cc sepal_length
# exporter_table_comments works
Code
exporter_table_comments(table = "retest_iris", schema = "public", db = "test_datalibaba",
user = "test", server = Sys.getenv("server"), fichier = fichier_temp, import = TRUE)
Message
Export du dictionnaire des variables csv 'C:\Users\edouard.morin\AppData\Local\Temp\RtmpSURFXd\test_exporter_table_comments17cb430ee74f1/comment_iris.csv'.
Output
nom_schema nom_table commentaire nom_col
1 public retest_iris <NA> <NA>
2 public retest_iris libellé de Petal.Length cc Petal.Length
3 public retest_iris libellé de Sepal.Width cc Sepal.Width
4 public retest_iris libellé de Species cc Species
5 public retest_iris libellé de Petal.Width cc Petal.Width
6 public retest_iris libellé de Sepal.Length cc Sepal.Length
6 public test_iris Commentlibaba ! species
......@@ -156,7 +156,8 @@ test_that("exporter_table_comments works", {
dir.create(mon_dossier_temp_aleatoire)
fichier_temp <- file.path(mon_dossier_temp_aleatoire, "comment_iris.csv")
expect_snapshot(exporter_table_comments(table = "retest_iris", schema = "public", db = "test_datalibaba", user = "test", server = Sys.getenv("server"), fichier = fichier_temp, import = TRUE))
expect_message(exporter_table_comments(table = "retest_iris", schema = "public", db = "test_datalibaba", user = "test", server = Sys.getenv("server"), fichier = fichier_temp, import = TRUE),
"Export du dictionnaire des variables csv")
# On vérifie que le fichier a bien été écrit en sortie
expect_true(file.exists(fichier_temp))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment