Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Double the size of everything
Browse files Browse the repository at this point in the history
Expect this to pass

Signed-off-by: mulhern <amulhern@redhat.com>
mulkieran committed May 6, 2024
1 parent ee6f50a commit 1b38e00
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/engine/strat_engine/thinpool/thinpool.rs
Original file line number Diff line number Diff line change
@@ -2590,14 +2590,14 @@ mod tests {
pool_name,
pool_uuid,
"stratis_test_filesystem",
Sectors::from(1200 * IEC::Ki),
// 700 * IEC::Mi
Some(Sectors(1400 * IEC::Ki)),
Sectors::from(2400 * IEC::Ki),
// 1400 * IEC::Mi
Some(Sectors(2800 * IEC::Ki)),
)
.unwrap();
let devnode = {
let (_, fs) = pool.get_mut_filesystem_by_uuid(fs_uuid).unwrap();
assert_eq!(fs.size_limit(), Some(Sectors(1400 * IEC::Ki)));
assert_eq!(fs.size_limit(), Some(Sectors(2800 * IEC::Ki)));
fs.devnode()
};

@@ -2621,8 +2621,8 @@ mod tests {
.open(new_file)
.unwrap();
let mut bytes_written = Bytes(0);
// Write 400 * IEC::Mi
while bytes_written < Bytes::from(400 * IEC::Mi) {
// Write 800 * IEC::Mi
while bytes_written < Bytes::from(800 * IEC::Mi) {
file.write_all(&[1; 4096]).unwrap();
bytes_written += Bytes(4096);
}
@@ -2634,16 +2634,16 @@ mod tests {
assert_eq!(fs.size_limit(), Some(fs.size().sectors()));
}

// 800 * IEC::Mi
pool.set_fs_size_limit(fs_uuid, Some(Sectors(1600 * IEC::Ki)))
// 1600 * IEC::Mi
pool.set_fs_size_limit(fs_uuid, Some(Sectors(3200 * IEC::Ki)))
.unwrap();
{
let (_, fs) = pool.get_mut_filesystem_by_uuid(fs_uuid).unwrap();
assert_eq!(fs.size_limit(), Some(Sectors(1600 * IEC::Ki)));
assert_eq!(fs.size_limit(), Some(Sectors(3200 * IEC::Ki)));
}
let mut bytes_written = Bytes(0);
// Write 100 * IEC::Mi
while bytes_written < Bytes::from(100 * IEC::Mi) {
// Write 200 * IEC::Mi
while bytes_written < Bytes::from(200 * IEC::Mi) {
file.write_all(&[1; 4096]).unwrap();
bytes_written += Bytes(4096);
}
@@ -2659,7 +2659,7 @@ mod tests {
let (_, fs) = pool
.snapshot_filesystem(pool_name, pool_uuid, fs_uuid, "snapshot")
.unwrap();
assert_eq!(fs.size_limit(), Some(Sectors(1600 * IEC::Ki)));
assert_eq!(fs.size_limit(), Some(Sectors(3200 * IEC::Ki)));
}

pool.set_fs_size_limit(fs_uuid, None).unwrap();
@@ -2668,8 +2668,8 @@ mod tests {
assert_eq!(fs.size_limit(), None);
}
let mut bytes_written = Bytes(0);
// Write 200 * IEC::Mi
while bytes_written < Bytes::from(200 * IEC::Mi) {
// Write 400 * IEC::Mi
while bytes_written < Bytes::from(400 * IEC::Mi) {
file.write_all(&[1; 4096]).unwrap();
bytes_written += Bytes(4096);
}
@@ -2678,7 +2678,7 @@ mod tests {

{
let (_, fs) = pool.get_mut_filesystem_by_uuid(fs_uuid).unwrap();
assert_eq!(fs.size().sectors(), Sectors(3200 * IEC::Ki));
assert_eq!(fs.size().sectors(), Sectors(6400 * IEC::Ki));
}

assert!(pool.set_fs_size_limit(fs_uuid, Some(Sectors(50))).is_err());

0 comments on commit 1b38e00

Please sign in to comment.