Commit e461650f authored by Jacob Schatz's avatar Jacob Schatz Committed by Micaël Bergeron

Fix failing tests.

parent 1481e45b
......@@ -44,12 +44,13 @@ module Pseudonymity
raise "No such directory #{@csv_output}"
end
tables.each do |k, v|
new_tables = tables.map do |k, v|
@schema[k] = {}
table_to_csv(k, v["whitelist"], v["pseudo"])
end
schema_to_yml
file_list_to_json
new_tables
end
def get_and_log_file_name(ext, prefix = nil, filename = nil)
......@@ -102,7 +103,7 @@ module Pseudonymity
end
def parse_config
@config = YAML.load_file(Rails.root.join('lib/assets/pseudonymity_dump.yml'))
@config = YAML.load_file(Rails.root.join('./ee/lib/assets/pseudonymity_dump.yml'))
end
def write_to_csv_file(title, contents)
......
......@@ -24,12 +24,12 @@ describe Gitlab::Pseudonymity do
# grab the first table it outputs. There would only be 1.
project_table_file = pseudo.tables_to_csv[0]
# Ignore the `.` and `..` in the directory.
entry = Dir.entries(base_dir)[2]
expect(project_table_file.include? "projects_").to be true
expect(project_table_file.include? ".csv").to be true
expect(project_table_file.include? entry).to be true
columns = []
project_data = []
File.foreach(project_table_file).with_index do |line, line_num|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment