change to use version 1.0 of the sample data (#323)
This commit is contained in:
Родитель
8f8bcb550a
Коммит
5116c72c89
|
@ -10,6 +10,7 @@ cmake/CPM.cmake
|
|||
cmake/ios.toolchain.cmake
|
||||
|
||||
data/0.95.0/
|
||||
data/1.0/
|
||||
|
||||
### Xcode and Swift ###
|
||||
|
||||
|
|
15
Makefile
15
Makefile
|
@ -59,12 +59,17 @@ ifeq ($(OPERATING_SYSTEM),Linux)
|
|||
endif
|
||||
ifeq ($(OPERATING_SYSTEM),Windows)
|
||||
@echo 🏁 WINDOWS INSTALL
|
||||
choco install wget
|
||||
choco install unzip
|
||||
choco upgrade wget -y
|
||||
choco upgrade unzip -y
|
||||
choco upgrade cmake -y
|
||||
endif
|
||||
wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.35.0/CPM.cmake
|
||||
wget -O sample-data-container.zip https://github.com/microsoft/electionguard/releases/download/v0.95.0/sample-data.zip
|
||||
unzip -o sample-data-container.zip
|
||||
wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.35.5/CPM.cmake
|
||||
make fetch-sample-data
|
||||
|
||||
fetch-sample-data:
|
||||
@echo ⬇️ FETCH Sample Data
|
||||
wget -O sample-data-1-0.zip https://github.com/microsoft/electionguard/releases/download/v1.0/sample-data.zip
|
||||
unzip -o sample-data-1-0.zip
|
||||
|
||||
|
||||
build:
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace ElectionGuard.Encryption.Utils
|
|||
{
|
||||
public class ManifestGenerator
|
||||
{
|
||||
const string TEST_SPEC_VERSION = "0.95.0";
|
||||
const string TEST_SPEC_VERSION = "1.0";
|
||||
const string TEST_USE_SAMPLE = "hamilton-general";
|
||||
// Test data was moved to the solution level and needed to be offset here
|
||||
const string TEST_OFFSET = @"../../../../../../../..";
|
||||
|
|
|
@ -12,7 +12,7 @@ using namespace electionguard;
|
|||
using namespace std;
|
||||
|
||||
#ifndef TEST_SPEC_VERSION
|
||||
# define TEST_SPEC_VERSION "0.95.0"
|
||||
# define TEST_SPEC_VERSION "1.0"
|
||||
#endif
|
||||
|
||||
#ifndef TEST_USE_SAMPLE
|
||||
|
|
|
@ -14,18 +14,6 @@ using namespace electionguard;
|
|||
using namespace electionguard::tools::generators;
|
||||
using namespace std;
|
||||
|
||||
#ifndef TEST_BALLOT_WITH_WRITEIN_SELECTED
|
||||
# define TEST_BALLOT_WITH_WRITEIN_SELECTED \
|
||||
"0.95.0/sample/full/election_private_data/plaintext_ballots/" \
|
||||
"plaintext_ballot_03a29d15-667c-4ac8-afd7-549f19b8e4eb.json"
|
||||
#endif
|
||||
|
||||
#ifndef TEST_BALLOT_WITH_WRITEIN_NOT_SELECTED
|
||||
# define TEST_BALLOT_WITH_WRITEIN_NOT_SELECTED \
|
||||
"0.95.0/sample/full/election_private_data/plaintext_ballots/" \
|
||||
"plaintext_ballot_ballot-06e7aa04-73fc-11ec-8051-acde48001122.json"
|
||||
#endif
|
||||
|
||||
TEST_CASE("Encrypt simple selection succeeds")
|
||||
{
|
||||
// Arrange
|
||||
|
@ -273,10 +261,6 @@ TEST_CASE("Encrypt full PlaintextBallot with WriteIn and Overvote with Encryptio
|
|||
"\"is_placeholder_selection\": false, \"extended_data\": null}, {\"object_id\":"
|
||||
" \"write-in-selection\", \"sequence_order\": 3, \"vote\": 1, \"is_placeholder_selection\""
|
||||
": false, \"write_in\": \"Susan B. Anthony\"}], \"extended_data\": null}]}");
|
||||
// TODO - Once the relevant plaintext ballot file is in the environment then
|
||||
// uncomment the below and stop using the hard coded string.
|
||||
//auto plaintextBallot =
|
||||
// BallotGenerator::getSimpleBallotFromFile(TEST_BALLOT_WITH_WRITEIN_SELECTED);
|
||||
auto plaintextBallot = PlaintextBallot::fromJson(plaintextBallot_json);
|
||||
auto ciphertext = mediator->encrypt(*plaintextBallot);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче