Add Tables for Continuous Fuzzing Feature
What does this MR do?
This creates basic database models for continuous fuzzing feature
Related Issues: https://gitlab.com/gl-fuzzing/fuzzit/-/issues/5
Short description of models:
Fuzzing::Target
- Each project can have multiple fuzz targets (or fuzz tests). This depends on how many fuzz tests the user implemented.
Fuzzing::Job
- For every push/commit (or pipeline trigger) one fuzzing job is created per target.
Fuzzing::Crash
- Crash is created per job when a crash is found.
Migration Output:
== 20200525091312 CreateFuzzingTarget: migrating ==============================
-- table_exists?(:fuzzing_targets)
-> 0.0003s
-- create_table(:fuzzing_targets)
-> 0.0186s
-- transaction_open?()
-> 0.0000s
-- execute("ALTER TABLE fuzzing_targets\nADD CONSTRAINT check_fb307ca0e6\nCHECK ( char_length(name) <= 255 )\nNOT VALID;\n")
-> 0.0007s
-- execute("ALTER TABLE fuzzing_targets VALIDATE CONSTRAINT check_fb307ca0e6;")
-> 0.0004s
== 20200525091312 CreateFuzzingTarget: migrated (0.0315s) =====================
== 20200526183129 CreateFuzzingJob: migrating =================================
-- table_exists?(:fuzzing_jobs)
-> 0.0004s
-- create_table(:fuzzing_jobs)
-> 0.0067s
== 20200526183129 CreateFuzzingJob: migrated (0.0081s) ========================
== 20200526183144 CreateFuzzingCrash: migrating ===============================
-- table_exists?(:fuzzing_crashes)
-> 0.0006s
-- create_table(:fuzzing_crashes)
-> 0.0044s
-- transaction_open?()
-> 0.0000s
-- execute("ALTER TABLE fuzzing_crashes\nADD CONSTRAINT check_d2683c4ee0\nCHECK ( char_length(crash_type) <= 1023 )\nNOT VALID;\n")
-> 0.0003s
-- execute("ALTER TABLE fuzzing_crashes VALIDATE CONSTRAINT check_d2683c4ee0;")
-> 0.0003s
-- transaction_open?()
-> 0.0000s
-- execute("ALTER TABLE fuzzing_crashes\nADD CONSTRAINT check_e3647bd031\nCHECK ( char_length(state) <= 1023 )\nNOT VALID;\n")
-> 0.0002s
-- execute("ALTER TABLE fuzzing_crashes VALIDATE CONSTRAINT check_e3647bd031;")
-> 0.0003s
-- transaction_open?()
-> 0.0000s
-- execute("ALTER TABLE fuzzing_crashes\nADD CONSTRAINT check_86148c0384\nCHECK ( char_length(stack_trace) <= 1023 )\nNOT VALID;\n")
-> 0.0002s
-- execute("ALTER TABLE fuzzing_crashes VALIDATE CONSTRAINT check_86148c0384;")
-> 0.0003s
== 20200526183144 CreateFuzzingCrash: migrated (0.0134s) ======================
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by 🤖 GitLab Bot 🤖